\GridFieldAddGroupedFields
A component which lets the user select from a list of classes to create a new record form.
By default the list of classes that are createable is the grid field's model class, and any
subclasses. This can be customised using .
Synopsis
class GridFieldAddGroupedFields
implements
GridField_HTMLProvider,GridField_URLHandler
{
- // members
- private static array $allowed_actions = ;
- private static boolean $showEmptyString = true;
- private $fragment;
- private $title;
- private $classes;
- private $defaultClass;
- protected string $itemRequestClass = 'GridFieldAddGroupedFieldsHandler';
- // methods
- public void __construct()
- public string getFragment()
- public GridFieldAddNewMultiClass setFragment()
- public string getTitle()
- public GridFieldAddNewMultiClass setTitle()
- public array getGroups()
- public array getClasses()
- public GridFieldAddNewMultiClass setClasses()
- public GridFieldAddNewMultiClass setDefaultClass()
- public GridFieldAddNewMultiClassHandler handleAdd()
- public void getHTMLFragments()
- public void getURLHandlers()
- public void setItemRequestClass()
Hierarchy
Implements
- GridField_HTMLProvider
- GridField_URLHandler
Members
private
- $allowed_actions
- $classes
- $defaultClass
- $fragment
- $showEmptyString
- $title
protected
- $itemRequestClass — string
Methods
public
- __construct()
- getClasses() — Gets the classes that can be created using this button, defaulting to the model class and its subclasses.
- getFragment() — Gets the fragment name this button is rendered into.
- getGroups() — Loads all the groups from GroupedFields
- getHTMLFragments() — {@inheritDoc}
- getTitle() — Gets the button title text.
- getURLHandlers() — {@inheritDoc}
- handleAdd() — Handles adding a new instance of a selected class.
- setClasses() — Sets the classes that can be created using this button.
- setDefaultClass() — Sets the default class that is selected automatically.
- setFragment() — Sets the fragment name this button is rendered into.
- setItemRequestClass()
- setTitle() — Sets the button title text.