Nblum\FlexibleContent\GridFieldActiveAction
This class is a {@link GridField} component that adds a delete action for objects.
This component also supports unlinking a relation instead of deleting the
object.
Use the property set in the constructor.
<code>
$action = new GridFieldDeleteAction(); // delete objects permanently
// removes the relation to object instead of deleting
$action = new GridFieldDeleteAction(true);
</code>
Synopsis
class GridFieldActiveAction
implements
GridField_ColumnProvider,GridField_ActionProvider
{
- // methods
- public void __construct()
- public void augmentColumns()
- public array getColumnAttributes()
- public array getColumnMetadata()
- public array getColumnsHandled()
- public array getActions()
- public string getColumnContent()
- public void handleAction()
Hierarchy
Implements
- GridField_ColumnProvider
- GridField_ActionProvider
Methods
public
- __construct()
- augmentColumns() — Add a column 'Delete'
- getActions() — Which GridField actions are this component handling
- 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
- handleAction() — Handle the actions and apply any changes to the GridField