function PluginBase::init

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

Overrides ViewsPluginInterface::init

6 methods override PluginBase::init()
DataFieldRow::init in core/modules/rest/src/Plugin/views/row/DataFieldRow.php
Initialize the plugin.
EntityRow::init in core/modules/views/src/Plugin/views/row/EntityRow.php
Initialize the plugin.
HandlerBase::init in core/modules/views/src/Plugin/views/HandlerBase.php
Initialize the plugin.
None::init in core/modules/views/src/Plugin/views/pager/None.php
Initialize the plugin.
Sql::init in core/modules/views/src/Plugin/views/query/Sql.php
Initialize the plugin.

... See full list

File

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

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.