You are here

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

Constructs a new HierarchyTreeSummary 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\entity_hierarchy\Storage\EntityTreeNodeMapperInterface $tree_mapper: Nested set node to entity mapper.

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

Overrides HandlerBase::__construct

File

src/Plugin/views/field/HierarchyTreeSummary.php, line 44

Class

HierarchyTreeSummary
A handler to provide a field that show hierarchy depth of item.

Namespace

Drupal\entity_hierarchy\Plugin\views\field

Code

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