You are here

public function Eva::__construct in EVA: Entity Views Attachment 8.2

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 DisplayPluginBase::__construct

File

src/Plugin/views/display/Eva.php, line 71

Class

Eva
The plugin that handles an EVA display in views.

Namespace

Drupal\eva\Plugin\views\display

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition, EntityTypeManagerInterface $entityTypeManager, EntityTypeBundleInfoInterface $bundleInfo, CurrentPathStack $currentPathStack, ViewDisplays $evaViewDisplays) {
  parent::__construct([], $plugin_id, $plugin_definition);
  $this->entityTypeManager = $entityTypeManager;
  $this->bundleInfo = $bundleInfo;
  $this->currentPathStack = $currentPathStack;
  $this->evaViewDisplays = $evaViewDisplays;
}