function PluginBase::init

Same name and namespace in other branches
  1. 11.x core/modules/views/src/Plugin/views/PluginBase.php \Drupal\views\Plugin\views\PluginBase::init()
  2. 10 core/modules/views/src/Plugin/views/PluginBase.php \Drupal\views\Plugin\views\PluginBase::init()
  3. 8.9.x core/modules/views/src/Plugin/views/PluginBase.php \Drupal\views\Plugin\views\PluginBase::init()

File

core/modules/views/src/Plugin/views/PluginBase.php, line 138

Class

PluginBase
Base class for any views plugin types.

Namespace

Drupal\views\Plugin\views

Code

public function init(ViewExecutable $view, DisplayPluginBase $display, array &$options = NULL) {
  $this->view = $view;
  $this->options = $this->options ?? [];
  $this->setOptionDefaults($this->options, $this->defineOptions());
  $this->displayHandler = $display;
  $this->unpackOptions($this->options, $options);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.