SilverShop\HasOneField\GridFieldHasOneUnlinkButton
Class GridFieldHasOneEditButton
Synopsis
class GridFieldHasOneUnlinkButton
implements
GridField_HTMLProvider,GridField_ActionProvider
{
- // members
- protected boolean $removeRelation = true;
- protected $targetFragment;
- protected DataObject $parent;
- // methods
- public void __construct()
- public void getTargetFragment()
- public GridFieldHasOneUnlinkButton setTargetFragment()
- public DataObject getParent()
- public GridFieldHasOneUnlinkButton setParent()
- public array getActions()
- public void handleAction()
- public array getHTMLFragments()
- public bool getRemoveRelation()
- public $this setRemoveRelation()
Hierarchy
Implements
- SilverStripe\Forms\GridField\GridField_HTMLProvider
- SilverStripe\Forms\GridField\GridField_ActionProvider
Members
protected
- $parent
—
SilverStripe\ORM\DataObject
The parent record to unlink the current record from - $removeRelation
—
boolean
If this is set to true, this {@link GridField_ActionProvider} will remove the object from the list, instead of deleting. -
$targetFragment
Fragment to write the button to
Methods
public
- __construct() — GridFieldHasOneUnlinkButton constructor.
- getActions()
- getHTMLFragments()
- getParent() — Get the parent record to unlink the current record from
- getRemoveRelation() — Get whether to remove or delete the relation
- getTargetFragment() — Get fragment to write the button to
- handleAction() — Manipulate the state to add a new relation
- setParent() — Set the parent record to unlink the current record from
- setRemoveRelation() — Set whether to remove or delete the relation
- setTargetFragment() — Set fragment to write the button to