This repository has been archived on 2024-10-16. You can view files and clone it, but cannot push or open issues or pull requests.
pflaenz.li-Symfony/src/Controller/Admin/OfferingCrudController.php

34 lines
1 KiB
PHP

<?php
namespace App\Controller\Admin;
use App\Entity\Offering;
use App\Entity\User;
use EasyCorp\Bundle\EasyAdminBundle\Controller\AbstractCrudController;
use EasyCorp\Bundle\EasyAdminBundle\Field\AssociationField;
use EasyCorp\Bundle\EasyAdminBundle\Field\IdField;
use EasyCorp\Bundle\EasyAdminBundle\Field\TextareaField;
use EasyCorp\Bundle\EasyAdminBundle\Field\TextField;
use EasyCorp\Bundle\EasyAdminBundle\Field\IntegerField;
use EasyCorp\Bundle\EasyAdminBundle\Field\DateTimeField;
class OfferingCrudController extends AbstractCrudController
{
public static function getEntityFqcn(): string
{
return Offering::class;
}
public function configureFields(string $pageName): iterable
{
return [
yield AssociationField::new('byUser'),
yield TextField::new('title'),
yield DateTimeField::new('createdAt'),
yield TextField::new('photoFilename'),
yield IntegerField::new('zipcode'),
yield TextareaField::new('description'),
];
}
}