From 4a41309efab459eb8573a695d7180dc0e4ea0edd Mon Sep 17 00:00:00 2001 From: louis Date: Fri, 29 Dec 2023 15:57:46 +0100 Subject: [PATCH] Fix Filters in AliasAdmin --- CHANGELOG.md | 1 + src/Admin/AliasAdmin.php | 24 ++++++------------------ 2 files changed, 7 insertions(+), 18 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3419453a..365e5f16 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ * Add __toString methods to Entities * Improve fixture loading while increasing the number of fixtures * Fix Filters in User Admin +* Fix Filters in Alias Admin # 3.3.1 (2023.11.12) diff --git a/src/Admin/AliasAdmin.php b/src/Admin/AliasAdmin.php index 8ce41ff3..5a148ce1 100644 --- a/src/Admin/AliasAdmin.php +++ b/src/Admin/AliasAdmin.php @@ -19,7 +19,8 @@ class AliasAdmin extends Admin { use DomainGuesserAwareTrait; - protected function generateBaseRoutePattern(bool $isChildAdmin = false): string { + protected function generateBaseRoutePattern(bool $isChildAdmin = false): string + { return 'alias'; } @@ -45,23 +46,10 @@ protected function configureFormFields(FormMapper $form): void protected function configureDatagridFilters(DatagridMapper $filter): void { $filter - ->add('source', null, [ - 'show_filter' => true, - ]) - ->add('user', null, [ - 'show_filter' => true, - ]) - ->add('domain', null, [ - 'show_filter' => true, - ]) - ->add('deleted', ChoiceFilter::class, [ - 'field_options' => [ - 'required' => false, - 'choices' => [0 => 'No', 1 => 'Yes'], - ], - 'field_type' => ChoiceType::class, - 'show_filter' => true, - ]); + ->add('source') + ->add('user') + ->add('domain') + ->add('deleted'); } /**