Skip to content
  • About
    • What is Symfony?
    • Community
    • News
    • Contributing
    • Support
  • Documentation
    • Symfony Docs
    • Symfony Book
    • Screencasts
    • Symfony Bundles
    • Symfony Cloud
    • Training
  • Services
    • Platform.sh for Symfony Best platform to deploy Symfony apps
    • SymfonyInsight Automatic quality checks for your apps
    • Symfony Certification Prove your knowledge and boost your career
    • SensioLabs Professional services to help you with Symfony
    • Blackfire Profile and monitor performance of your apps
  • Other
  • Blog
  • Download
sponsored by
  1. Home
  2. Documentation
  3. Bundles
  4. SonataAdminBundle
  5. Events

Events

Edit this page

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.form
  • sonata.admin.event.configure.list
  • sonata.admin.event.configure.datagrid
  • sonata.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_update
  • sonata.admin.event.persistence.post_update
  • sonata.admin.event.persistence.pre_persist
  • sonata.admin.event.persistence.post_persist
  • sonata.admin.event.persistence.pre_remove
  • sonata.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.top
  • sonata.admin.dashboard.bottom
  • sonata.admin.list.table.top
  • sonata.admin.list.table.bottom
  • sonata.admin.edit.form.top
  • sonata.admin.edit.form.bottom
  • sonata.admin.show.top
  • sonata.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.
TOC
    Version
    Be trained by SensioLabs experts (2 to 6 day sessions -- French or English).

    Be trained by SensioLabs experts (2 to 6 day sessions -- French or English).

    Be safe against critical risks to your projects and businesses

    Be safe against critical risks to your projects and businesses

    Version:

    Table of Contents

    • ConfigureEvent
    • PersistenceEvent
    • ConfigureQueryEvent
    • BlockEvent
    • BatchActionEvent

    Symfony footer

    Avatar of michaelwilliams, a Symfony contributor

    Thanks michaelwilliams for being a Symfony contributor

    2 commits • 40 lines changed

    View all contributors that help us make Symfony

    Become a Symfony contributor

    Be an active part of the community and contribute ideas, code and bug fixes. Both experts and newcomers are welcome.

    Learn how to contribute

    Symfony™ is a trademark of Symfony SAS. All rights reserved.

    • What is Symfony?

      • What is Symfony?
      • Symfony at a Glance
      • Symfony Components
      • Symfony Releases
      • Security Policy
      • Logo & Screenshots
      • Trademark & Licenses
      • symfony1 Legacy
    • Learn Symfony

      • Symfony Docs
      • Symfony Book
      • Reference
      • Bundles
      • Best Practices
      • Training
      • eLearning Platform
      • Certification
    • Screencasts

      • Learn Symfony
      • Learn PHP
      • Learn JavaScript
      • Learn Drupal
      • Learn RESTful APIs
    • Community

      • Symfony Community
      • SymfonyConnect
      • Events & Meetups
      • Projects using Symfony
      • Contributors
      • Symfony Jobs
      • Backers
      • Code of Conduct
      • Downloads Stats
      • Support
    • Blog

      • All Blog Posts
      • A Week of Symfony
      • Case Studies
      • Cloud
      • Community
      • Conferences
      • Diversity
      • Living on the edge
      • Releases
      • Security Advisories
      • Symfony Insight
      • Twig
      • SensioLabs Blog
    • Services

      • SensioLabs services
      • Train developers
      • Manage your project quality
      • Improve your project performance
      • Host Symfony projects

      Powered by

    Follow Symfony