This version unlocks dependency to EasyAdmin by allowing EasyAdmin ^2.2.0. As this version of EasyAdmin introduce its own implementation of list filters (using query parameter filter
), and considering it is not compatible with extension bundle's implementation : I decided to rename the parameter to pass filters used by the extension. This is an important BC BREAK.
filter
is now used by native EasyAdmin implementation. Use ext_filters
for extension implementation (for embedded lists) !
BEFORE
<url-to-admin>?action=list&entity=Book&filters[entity.releaseDate]=2016
AFTER
<url-to-admin>?action=list&entity=Book&ext_filters[entity.releaseDate]=2016
BEFORE
easy_admin:
entities:
Event:
class: App\Entity\Event
Promoter:
class: App\Entity\Promoter
form:
fields:
# ...
- { type: group, label: Events, css_class: 'col-sm-12', icon: calendar }
- { property: events, label: '', type: embedded_list, type_options: { entity: Event, filters: { 'entity.promoter': 'form:parent.data.id' } } }
AFTER
easy_admin:
entities:
Event:
class: App\Entity\Event
Promoter:
class: App\Entity\Promoter
form:
fields:
# ...
- { type: group, label: Events, css_class: 'col-sm-12', icon: calendar }
- { property: events, label: '', type: embedded_list, type_options: { entity: Event, ext_filters: { 'entity.promoter': 'form:parent.data.id' } } }
Replace role
option in menu configuration by permission
(native EasyAdmin implementation). Empty menu folders are not pruned nor re-indexed with EasyAdmin implementation.
BEFORE
easy_admin:
design:
menu:
- { label: Dashboard, route: admin_dashboard, icon: home, default: true }
- { label: Challenges, entity: Challenge, icon: running, role: ROLE_CHALLENGE_LIST }
AFTER
easy_admin:
design:
menu:
- { label: Dashboard, route: admin_dashboard, icon: home, default: true }
- { label: Challenges, entity: Challenge, icon: running, permission: ROLE_CHALLENGE_LIST }
Note that prune_menu_items
Twig function and MenuHelper
service have been removed too.
List filters form have been improved, with minor BC breaks :
- Label must be configured on the root level, not in the
type_options
attribiute.
BEFORE
easy_admin:
entities:
MyEntity:
class: App\Entity\MyEntity
list:
form_filters:
- { name: myFilter, property: status, type_options: { label: 'Filter on status' } }
AFTER
easy_admin:
entities:
MyEntity:
class: App\Entity\MyEntity
list:
form_filters:
- { name: myFilter, property: status, label: 'Filter on status' }