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

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