I'm using SonataAdminBundle
for managing entities in my application. The admins of the site can add videos, and some of them first need to be approved by their speakers. There is an authorization system working already - I have working code which will generate a special link and notify the speaker, who can approve or disapprove the video, and notify back the admins automatically.
I'd like to customize my admin section, so there will be a button ask for authorization
next to the videos. I'm okay having it either in the list action ( /admin/acme/videos/list
) or in the edit action somewhere in the right-nav ( /admin/acme/videos/x/edit/
)
What's the best approach to do this? The documentation says very little about blocks customization, but I found this example which may be the thing I'm looking for, but I couldn't figure out how to use it.
One option is to use the preUpdate
hook, and add a checkbox to the edit action, but a button would be much nicer.