public function BulkForm::init in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/system/src/Plugin/views/field/BulkForm.php \Drupal\system\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/ system/ src/ Plugin/ views/ field/ BulkForm.php, line 104 - Contains \Drupal\system\Plugin\views\field\BulkForm.
Class
- BulkForm
- Defines a actions-based bulk operation form element.
Namespace
Drupal\system\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;
});
}