public function BulkForm::init in Drupal 8
Same name and namespace in other branches
- 9 core/modules/views/src/Plugin/views/field/BulkForm.php \Drupal\views\Plugin\views\field\BulkForm::init()
- 10 core/modules/views/src/Plugin/views/field/BulkForm.php \Drupal\views\Plugin\views\field\BulkForm::init()
Initialize the plugin.
Parameters
\Drupal\views\ViewExecutable $view: The view object.
\Drupal\views\Plugin\views\display\DisplayPluginBase $display: The display handler.
array $options: The options configured for this plugin.
Overrides FieldPluginBase::init
File
- core/
modules/ views/ src/ Plugin/ views/ field/ BulkForm.php, line 134
Class
- BulkForm
- Defines a actions-based bulk operation form element.
Namespace
Drupal\views\Plugin\views\fieldCode
public function init(ViewExecutable $view, DisplayPluginBase $display, array &$options = NULL) {
parent::init($view, $display, $options);
$entity_type = $this
->getEntityType();
// Filter the actions to only include those for this entity type.
$this->actions = array_filter($this->actionStorage
->loadMultiple(), function ($action) use ($entity_type) {
return $action
->getType() == $entity_type;
});
}