Skip to content

Commit

Permalink
Merge pull request #525 from systemli/Fix-Filters-in-AliasAdmin
Browse files Browse the repository at this point in the history
Fix Filters in AliasAdmin
  • Loading branch information
0x46616c6b authored Dec 29, 2023
2 parents 14851c6 + 4a41309 commit d6cf1e7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 18 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
24 changes: 6 additions & 18 deletions src/Admin/AliasAdmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -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';
}

Expand All @@ -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');
}

/**
Expand Down

0 comments on commit d6cf1e7

Please sign in to comment.