You are here

public function Node::__construct in Drupal 9

Same name in this branch
  1. 9 core/modules/node/src/Plugin/views/argument_default/Node.php \Drupal\node\Plugin\views\argument_default\Node::__construct()
  2. 9 core/modules/node/src/Plugin/views/wizard/Node.php \Drupal\node\Plugin\views\wizard\Node::__construct()
  3. 9 core/modules/node/src/Plugin/migrate/source/d6/Node.php \Drupal\node\Plugin\migrate\source\d6\Node::__construct()
  4. 9 core/modules/node/src/Plugin/migrate/source/d7/Node.php \Drupal\node\Plugin\migrate\source\d7\Node::__construct()
Same name and namespace in other branches
  1. 8 core/modules/node/src/Plugin/views/wizard/Node.php \Drupal\node\Plugin\views\wizard\Node::__construct()

Node constructor.

Parameters

array $configuration: The plugin configuration.

string $plugin_id: The plugin ID.

mixed $plugin_definition: The plugin definition.

\Drupal\Core\Entity\EntityTypeBundleInfoInterface $bundle_info_service: The entity bundle info service.

\Drupal\Core\Entity\EntityDisplayRepositoryInterface $entity_display_repository: The entity display repository service.

\Drupal\Core\Entity\EntityFieldManagerInterface $entity_field_manager: The entity field manager.

\Drupal\Core\Menu\MenuParentFormSelectorInterface $parent_form_selector: The parent form selector service.

Overrides WizardPluginBase::__construct

File

core/modules/node/src/Plugin/views/wizard/Node.php, line 68

Class

Node
Tests creating node views with the wizard.

Namespace

Drupal\node\Plugin\views\wizard

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition, EntityTypeBundleInfoInterface $bundle_info_service, EntityDisplayRepositoryInterface $entity_display_repository, EntityFieldManagerInterface $entity_field_manager, MenuParentFormSelectorInterface $parent_form_selector = NULL) {
  if (!$parent_form_selector) {
    @trigger_error('Calling ' . __METHOD__ . '() without the $parent_form_selector argument is deprecated in drupal:9.3.0 and the $parent_form_selector argument will be required in drupal:10.0.0. See https://www.drupal.org/node/3027559', E_USER_DEPRECATED);
    $parent_form_selector = \Drupal::service('menu.parent_form_selector');
  }
  parent::__construct($configuration, $plugin_id, $plugin_definition, $bundle_info_service, $parent_form_selector);
  $this->entityDisplayRepository = $entity_display_repository;
  $this->entityFieldManager = $entity_field_manager;
}