GridFieldAddByDBField
class GridFieldAddByDBField implements GridField_ActionProvider, GridField_HTMLProvider (View source)
Adds a component which allows a user to add a new DataObject by database field.
Properties
protected | string | $targetFragment | HTML Fragment to render the field. |
|
protected | string | $dataObjectField | Default field to create the DataObject by should be Title. |
Methods
Creates a text field and add button which allows the user to directly create a new DataObject by just entering the title.
Handles the add action for the given DataObject.
Returns the database field for which we'll add the new data object.
Details
__construct(string $targetFragment = 'before', string $dataObjectField = 'Title')
Creates a text field and add button which allows the user to directly create a new DataObject by just entering the title.
array
getActions($gridField)
Provide actions to this component.
handleAction(GridField $gridField, $actionName, $arguments, $data)
Handles the add action for the given DataObject.
string
getDataObjectField()
Returns the database field for which we'll add the new data object.
setDataObjectField($field)
Set the database field.
array
getHTMLFragments($gridField)
Renders the TextField and add button to the GridField.