unclecheese / silverstripe-gridfield-betterbuttons

Adds new form actions and buttons to the GridField detail form
GNU General Public License v2.0
80 stars 88 forks source link

How are versioning buttons added #157

Closed muppsy007 closed 7 years ago

muppsy007 commented 7 years ago

Readme is quite detailed, especially around creating custom buttons and actions. But I see no mention of how to add the versioning buttons (Save & Publish) functionality to a given DataObject. How does one do this?

unclecheese commented 7 years ago

They should be added automatically if the DataObject has the Versioned extension.

But for granular control over the buttons, getBetterButtonsActions() is the final source of truth. If you just define that method, you can add/remove whatever you like.

muppsy007 commented 7 years ago

Thanks mate. I wasn't aware Versioned was part of core.