LeKoala\CmsActions\GridFieldRowButton
A boilerplate to create row level buttons
It create the "Actions" columns if it doesn't exist yet
Synopsis
class GridFieldRowButton
implements
GridField_ColumnProvider,GridField_ActionProvider
{
- // members
- protected $fontIcon;
- protected boolean $hiddenOnHover = true;
- protected $parentID;
- // methods
- public abstract void getButtonLabel()
- public abstract void doHandle()
- public void getActionName()
- public void augmentColumns()
- public array getColumnAttributes()
- public array getColumnMetadata()
- public array getColumnsHandled()
- public array getActions()
- public string getColumnContent()
- public void handleAction()
- public int getParentID()
- public $this setParentID()
- public string getFontIcon()
- public $this setFontIcon()
- public boolean getHiddenOnHover()
- public $this setHiddenOnHover()
Hierarchy
Implements
- SilverStripe\Forms\GridField\GridField_ColumnProvider
- SilverStripe\Forms\GridField\GridField_ActionProvider
Members
protected
- $fontIcon
—
string
A silverstripe icon - $parentID — int
Methods
public
- augmentColumns()
- doHandle()
- getActionName()
- getActions() — Which GridField actions are this component handling
- getButtonLabel()
- getColumnAttributes() — Return any special attributes that will be used for FormField::create_tag()
- getColumnContent()
- getColumnMetadata() — Add the title
- getColumnsHandled() — Which columns are handled by this component
- getFontIcon() — Get a silverstripe icon
- getHiddenOnHover() — Get adds class grid-field__icon-action--hidden-on-hover if set
- getParentID() — Get the parent record id
- handleAction() — Handle the actions and apply any changes to the GridField
- setFontIcon() — Set a silverstripe icon
- setHiddenOnHover() — Set adds class grid-field__icon-action--hidden-on-hover if set
- setParentID() — Set the parent record id