You are here

public function EntityHierarchyArgumentPluginBase::__construct in Entity Reference Hierarchy 3.x

Same name and namespace in other branches
  1. 8.2 src/Plugin/views/argument/EntityHierarchyArgumentPluginBase.php \Drupal\entity_hierarchy\Plugin\views\argument\EntityHierarchyArgumentPluginBase::__construct()

Constructs a new HierarchyIsParentOfEntity object.

Parameters

array $configuration: Configuration.

string $plugin_id: Plugin ID.

mixed $plugin_definition: Definition.

\Drupal\entity_hierarchy\Storage\NestedSetStorageFactory $nestedSetStorageFactory: Nested set storage.

\Drupal\Core\Entity\EntityTypeManagerInterface $entityTypeManager: Entity type manager.

\Drupal\entity_hierarchy\Storage\NestedSetNodeKeyFactory $nodeKeyFactory: Node key factory.

\Drupal\Core\Database\Connection $database: Database connection.

Overrides HandlerBase::__construct

File

src/Plugin/views/argument/EntityHierarchyArgumentPluginBase.php, line 62

Class

EntityHierarchyArgumentPluginBase
Defines a base argument plugin.

Namespace

Drupal\entity_hierarchy\Plugin\views\argument

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition, NestedSetStorageFactory $nestedSetStorageFactory, EntityTypeManagerInterface $entityTypeManager, NestedSetNodeKeyFactory $nodeKeyFactory, Connection $database) {
  parent::__construct($configuration, $plugin_id, $plugin_definition);
  $this->nestedSetStorageFactory = $nestedSetStorageFactory;
  $this->entityTypeManager = $entityTypeManager;
  $this->nodeKeyFactory = $nodeKeyFactory;
  $this->nestedSetPrefix = $database
    ->tablePrefix();
}