SilverStripe\Blog\Forms\GridField\GridFieldAddByDBField
Synopsis
class GridFieldAddByDBField
implements
GridField_ActionProvider,GridField_HTMLProvider
{
- // members
- protected $targetFragment;
- protected string $dataObjectField = 'Title';
- protected $buttonName;
- // methods
- public void __construct()
- public array getActions()
- public null|HTTPResponse handleAction()
- public string getDataObjectField()
- public $this setButtonName()
- public void setDataObjectField()
- public array getHTMLFragments()
Hierarchy
Uses
- SilverStripe\Core\Injector\Injectable
Implements
- SilverStripe\Forms\GridField\GridField_ActionProvider
- SilverStripe\Forms\GridField\GridField_HTMLProvider
Members
protected
- $dataObjectField
—
string
Default field to create the DataObject by should be Title. - $targetFragment
—
string
HTML Fragment to render the field.
Methods
public
- __construct() — Creates a text field and add button which allows the user to directly create a new DataObject by just entering the title.
- getActions() — Provide actions to this component.
- getDataObjectField() — Returns the database field for which we'll add the new data object.
- getHTMLFragments() — Renders the TextField and add button to the GridField.
- handleAction() — Handles the add action for the given DataObject.
- setButtonName() — Set the button name
- setDataObjectField() — Set the database field.