silverstripe-framework/Forms/GridField/GridField_ActionProvider.php
Damian Mooyman 8dd644d25d
API Namespace all classes
Namespace all templates
Move difflib and BBCodeParser2 to thirdparty
Remove deprecated API marked for removal in 4.0
2016-09-08 10:23:17 +12:00

46 lines
1.4 KiB
PHP

<?php
namespace SilverStripe\Forms\GridField;
/**
* 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.
*
* @see {@link GridField_FormAction}.
*/
interface GridField_ActionProvider extends GridFieldComponent
{
/**
* Return a list of the actions handled by this action provider.
*
* Used to identify the action later on through the $actionName parameter
* in {@link handleAction}.
*
* There is no namespacing on these actions, so you need to ensure that
* they don't conflict with other components.
*
* @param GridField
* @return array with action identifier strings.
*/
public function getActions($gridField);
/**
* Handle an action on the given {@link GridField}.
*
* Calls ALL components for every action handled, so the component needs
* to ensure it only accepts actions it is actually supposed to handle.
*
* @param GridField $gridField
* @param string $actionName Action identifier, see {@link getActions()}.
* @param array $arguments Arguments relevant for this
* @param array $data All form data
*/
public function handleAction(GridField $gridField, $actionName, $arguments, $data);
}