You are here

public function DisplayPluginBase::__construct in Drupal 8

Same name and namespace in other branches
  1. 9 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 143

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);
}