BulkManager
class BulkManager implements GridField_HTMLProvider, GridField_ColumnProvider, GridField_URLHandler (View source)
GridField component for editing attached models in bulk.
Traits
A class that can be instantiated or replaced via DI
Properties
protected | array | $config | component configuration. |
Methods
An implementation of the factory method, allows you to create an instance of a class
Creates a class instance by the "singleton" design pattern.
BulkManager component constructor.
Returns one $config parameter of the full $config.
Lets you add custom bulk actions to the bulk manager interface.
Removes a bulk actions from the bulk manager interface.
Sets the column's content.
Set the column's HTML attributes.
Pass control over to the RequestHandler loop through the handlers provided in config['actions'] and find matching url_handlers.
Details
static Injectable
create(mixed ...$args)
An implementation of the factory method, allows you to create an instance of a class
This method will defer class substitution to the Injector API, which can be customised via the Config API to declare substitution classes.
This can be called in one of two ways - either calling via the class directly, or calling on Object and passing the class name as the first parameter. The following are equivalent: $list = DataList::create(SiteTree::class); $list = SiteTree::get();
static Injectable
singleton(string $class = null)
Creates a class instance by the "singleton" design pattern.
It will always return the same instance for this class, which can be used for performance reasons and as a simple way to access instance methods which don't rely on instance data (e.g. the custom SilverStripe static handling).
__construct(array $editableFields = null, bool $defaultActions = true, $defaultVersionedActions = false)
BulkManager component constructor.
setConfig(string $reference, mixed $value)
Sets the component configuration parameter.
mixed
getConfig(string $reference = false)
Returns one $config parameter of the full $config.
$this
addBulkAction(string $handlerClassName, string $action = null)
Lets you add custom bulk actions to the bulk manager interface.
Exisiting handler will be replaced
$this
removeBulkAction(string $handlerClassName = null, string $urlSegment = null)
Removes a bulk actions from the bulk manager interface.
RequestHandler[]
getBulkActions()
Return the list of bulk actions already provided
augmentColumns(GridField $gridField, array $columns)
Add bulk select column.
array
getColumnsHandled(GridField $gridField)
Which columns are handled by the component.
string
getColumnContent(GridField $gridField, DataObject $record, string $columnName)
Sets the column's content.
array
getColumnAttributes(GridField $gridField, DataObject $record, string $columnName)
Set the column's HTML attributes.
array
getColumnMetadata(GridField $gridField, string $columnName)
Set the column's meta data.
array
getHTMLFragments(GridField $gridField)
No description
array
getURLHandlers(GridField $gridField)
Returns an action => handler list.
mixed
handleBulkAction(GridField $gridField, HTTPRequest $request)
Pass control over to the RequestHandler loop through the handlers provided in config['actions'] and find matching url_handlers.
$url_handlers rule should not use wildcards like '$Action' => '$Action' but have more specific path defined