Events
An event mechanism is available to add an extra entry point to extend an Admin instance.
ConfigureEvent
This event is generated when a form, list, show, datagrid is configured. The event names are:
sonata.admin.event.configure.formsonata.admin.event.configure.listsonata.admin.event.configure.datagridsonata.admin.event.configure.show
PersistenceEvent
This event is generated when a persistency layer update, save or delete an object. The event names are:
sonata.admin.event.persistence.pre_updatesonata.admin.event.persistence.post_updatesonata.admin.event.persistence.pre_persistsonata.admin.event.persistence.post_persistsonata.admin.event.persistence.pre_removesonata.admin.event.persistence.post_remove
ConfigureQueryEvent
This event is generated when a list query is defined. The event name is: sonata.admin.event.configure.query
BlockEvent
Block events help you customize your templates. Available events are :
sonata.admin.dashboard.topsonata.admin.dashboard.bottomsonata.admin.list.table.topsonata.admin.list.table.bottomsonata.admin.edit.form.topsonata.admin.edit.form.bottomsonata.admin.show.topsonata.admin.show.bottom
If you want more information about block events, you should check the "Event" section of block bundle documentation.
BatchActionEvent
This event is dispatched when a batch action is being executed. The event name is:
sonata.admin.event.batch_action.pre_batch_action
This work, including the code samples, is licensed under a
Creative Commons BY-SA 3.0 license.