function DisplayPluginBase::__construct

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

Constructs a new DisplayPluginBase object.

Because DisplayPluginBase::initDisplay() takes the display configuration by reference and handles it differently than usual plugin configuration, pass an empty array of configuration to the parent. This prevents our configuration from being duplicated.

@todo Replace DisplayPluginBase::$display with DisplayPluginBase::$configuration to standardize with other plugins.

Parameters

array $configuration: A configuration array containing information about the plugin instance.

string $plugin_id: The plugin ID for the plugin instance.

mixed $plugin_definition: The plugin implementation definition.

Overrides PluginBase::__construct

3 calls to DisplayPluginBase::__construct()
Block::__construct in core/modules/views/src/Plugin/views/display/Block.php
Constructs a new Block instance.
EntityReference::__construct in core/modules/views/src/Plugin/views/display/EntityReference.php
Constructs a new EntityReference object.
PathPluginBase::__construct in core/modules/views/src/Plugin/views/display/PathPluginBase.php
Constructs a PathPluginBase object.
3 methods override DisplayPluginBase::__construct()
Block::__construct in core/modules/views/src/Plugin/views/display/Block.php
Constructs a new Block instance.
EntityReference::__construct in core/modules/views/src/Plugin/views/display/EntityReference.php
Constructs a new EntityReference object.
PathPluginBase::__construct in core/modules/views/src/Plugin/views/display/PathPluginBase.php
Constructs a PathPluginBase object.

File

core/modules/views/src/Plugin/views/display/DisplayPluginBase.php, line 158

Class

DisplayPluginBase
Base class for views display plugins.

Namespace

Drupal\views\Plugin\views\display

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition) {
    parent::__construct([], $plugin_id, $plugin_definition);
}

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