EpisodeCrudController: add filter

This commit is contained in:
dece 2023-05-23 22:02:17 +02:00
parent b25959b935
commit dadaea8def

View file

@ -5,6 +5,7 @@ namespace App\Controller\Admin;
use App\Constants; use App\Constants;
use App\Entity\Episode; use App\Entity\Episode;
use App\Controller\Admin\Field\FileField; use App\Controller\Admin\Field\FileField;
use EasyCorp\Bundle\EasyAdminBundle\Config\Filters;
use EasyCorp\Bundle\EasyAdminBundle\Controller\AbstractCrudController; use EasyCorp\Bundle\EasyAdminBundle\Controller\AbstractCrudController;
use EasyCorp\Bundle\EasyAdminBundle\Field\AssociationField; use EasyCorp\Bundle\EasyAdminBundle\Field\AssociationField;
use EasyCorp\Bundle\EasyAdminBundle\Field\DateTimeField; use EasyCorp\Bundle\EasyAdminBundle\Field\DateTimeField;
@ -18,6 +19,12 @@ class EpisodeCrudController extends AbstractCrudController
return Episode::class; return Episode::class;
} }
public function configureFilters(Filters $filters): Filters
{
return $filters
->add('podcast');
}
public function configureFields(string $pageName): iterable public function configureFields(string $pageName): iterable
{ {
return [ return [