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

31 lines
840 B
PHP
Raw Normal View History

2021-04-24 17:55:48 +02:00
<?php
namespace App\Controller\Admin;
use App\Entity\Offering;
2021-04-26 17:05:38 +02:00
use App\Entity\User;
2021-04-24 17:55:48 +02:00
use EasyCorp\Bundle\EasyAdminBundle\Controller\AbstractCrudController;
2021-04-26 17:05:38 +02:00
use EasyCorp\Bundle\EasyAdminBundle\Field\AssociationField;
use EasyCorp\Bundle\EasyAdminBundle\Field\IdField;
use EasyCorp\Bundle\EasyAdminBundle\Field\TextField;
use EasyCorp\Bundle\EasyAdminBundle\Field\DateTimeField;
2021-04-24 17:55:48 +02:00
class OfferingCrudController extends AbstractCrudController
{
public static function getEntityFqcn(): string
{
return Offering::class;
}
public function configureFields(string $pageName): iterable
{
return [
2021-04-26 17:05:38 +02:00
yield AssociationField::new('byUser'),
yield TextField::new('title'),
yield DateTimeField::new('createdAt'),
yield TextField::new('photoFilename'),
2021-04-24 17:55:48 +02:00
];
}
}