UncleCheese\BetterButtons\Extensions\BetterButtonDataObject

An extension that offers features to DataObjects that allow them to set their own actions and utilities for {@link GridFieldDetailForm}

Default buttons are defined in _config.yml and can be overriden via the Config layer.
Due to the way Config merges arrays, set button class names to "false" to remove them from the list.

Synopsis

class BetterButtonDataObject extends DataExtension {
}

Hierarchy

Extends

  • SilverStripe\ORM\DataExtension

Members

private

Methods

protected

public

  • checkVersioned() — Determines if the record is using the {@link Versioned} extension
  • findActionByName() — Gets a FormAction or BetterButtonCustomAction by name, in utils or actions
  • getBetterButtonsActions() — Gets the default actions for all DataObjects. Can be overloaded in subclasses <code> public function getBetterButtonsActions() { $actions = parent::getBetterButtonsActions(); $actions->push(BetterButtonCustomAction::create('myaction','Do something to this record'));
  • getBetterButtonsUtils() — Gets the default utils for all DataObjects. Can be overloaded in subclasses.
  • isCustomActionAllowed() — Checks if a custom action is allowed to be called against a model.