As it stands right now, if I want to change the IPE buttons in any way, I have to hook_page_alter() my way into them and do some pretty gross stuff. These could be altered during the add_meta() phase and allow modules collaborating in the panel display rendering process to have some say over the buttons. My use case to to allow me to hide these buttons in some cases through an access check.
Eclipse
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 2465193-1.patch | 2.03 KB | eclipsegc |
Comments
Comment #1
eclipsegc commentedcode!
Ok, this code adds an alter into panels_ipe_toolbar_add_button() which allows us to edit each button individually as necessary. In addition to this change, I've passed the non-clean-string'd version of the IPE cache key. To compensate for this change, I clean the string before rendering the buttons in the theme function.
All of this together gives me an alter that allows me to control much about these buttons including things like access. In my own use case, I'm denying access to these buttons on workbench_moderated node types so that draft mode edits are the only way to alter the display, but that's just my own use case.
Comment #2
eclipsegc commentedoops, ok code for real
Eclipse
Comment #3
eyilmazThank you. Reviewed and tested. Works as expected.
We are using this in for the same purpose as Eclipse, but with revisioning/workflow.
Would be nice if this gets committed soon.
Comment #4
Anonymous (not verified) commentedWe have been using this for 6+ months in production as well with no problems.
Comment #6
japerryThis is also being used in production by lightning and some others. Looks good to me. Committed.