GridField_ActionProvider
interface GridField_ActionProvider implements GridFieldComponent (View source)
An action is defined by two things: an action name, and zero or more named arguments.
There is no built-in notion of a record-specific or column-specific action, but you may choose to define an argument such as ColumnName or RecordID in order to implement these.
Does not provide interface elements to call those actions.
Methods
Handle an action on the given GridField.
Details
array
getActions(GridField $gridField)
Return a list of the actions handled by this action provider.
Used to identify the action later on through the $actionName parameter in handleAction.
There is no namespacing on these actions, so you need to ensure that they don't conflict with other components.
handleAction(GridField $gridField, string $actionName, array $arguments, array $data)
Handle an action on the given GridField.
Calls ALL components for every action handled, so the component needs to ensure it only accepts actions it is actually supposed to handle.