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

35 lines
1 KiB
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;
2021-04-27 13:20:37 +02:00
use EasyCorp\Bundle\EasyAdminBundle\Field\TextareaField;
2021-04-26 17:05:38 +02:00
use EasyCorp\Bundle\EasyAdminBundle\Field\TextField;
2021-04-26 23:50:11 +02:00
use EasyCorp\Bundle\EasyAdminBundle\Field\IntegerField;
2021-04-26 17:05:38 +02:00
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-26 23:50:11 +02:00
yield IntegerField::new('zipcode'),
2021-04-27 13:20:37 +02:00
yield TextareaField::new('description'),
2021-04-24 17:55:48 +02:00
];
}
}