function BulkForm::init
Same name in other branches
- 8.9.x 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()
- 11.x core/modules/views/src/Plugin/views/field/BulkForm.php \Drupal\views\Plugin\views\field\BulkForm::init()
Overrides FieldPluginBase::init
File
-
core/
modules/ views/ src/ Plugin/ views/ field/ BulkForm.php, line 123
Class
- BulkForm
- Defines an 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;
});
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.