You are here

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

Same name and namespace in other branches
  1. 8.2 modules/entity_hierarchy_workbench_access/src/Plugin/AccessControlHierarchy/EntityHierarchy.php \Drupal\entity_hierarchy_workbench_access\Plugin\AccessControlHierarchy\EntityHierarchy::__construct()

Constructs a new EntityHierarchy object.

Parameters

array $configuration: Configuration.

string $plugin_id: Plugin ID.

mixed $plugin_definition: Definition.

\Drupal\workbench_access\UserSectionStorageInterface $userSectionStorage: User section storage.

\Drupal\Core\Entity\EntityFieldManagerInterface $entityFieldManager: Entity Field manager.

\Drupal\entity_hierarchy\Storage\NestedSetStorageFactory $nestedSetStorageFactory: Storage factory.

\Drupal\entity_hierarchy\Storage\NestedSetNodeKeyFactory $nodeKeyFactory: Key factory.

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

\Drupal\Core\Config\ConfigFactoryInterface $configFactory: Config factory.

\Drupal\entity_hierarchy\Storage\EntityTreeNodeMapperInterface $entityTreeNodeMapper: Tree node mapper.

File

modules/entity_hierarchy_workbench_access/src/Plugin/AccessControlHierarchy/EntityHierarchy.php, line 93

Class

EntityHierarchy
Defines a hierarchy based on an entity hierarchy field.

Namespace

Drupal\entity_hierarchy_workbench_access\Plugin\AccessControlHierarchy

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition, UserSectionStorageInterface $userSectionStorage, EntityFieldManagerInterface $entityFieldManager, NestedSetStorageFactory $nestedSetStorageFactory, NestedSetNodeKeyFactory $nodeKeyFactory, EntityTypeManagerInterface $entityTypeManager, ConfigFactoryInterface $configFactory, EntityTreeNodeMapperInterface $entityTreeNodeMapper, CacheBackendInterface $cacheBackend) {
  parent::__construct($configuration, $plugin_id, $plugin_definition, $userSectionStorage, $configFactory, $entityTypeManager);
  $this->entityFieldManager = $entityFieldManager;
  $this->nestedSetStorageFactory = $nestedSetStorageFactory;
  $this->keyFactory = $nodeKeyFactory;
  $this->entityTreeNodeMapper = $entityTreeNodeMapper;
  $this->cacheBackend = $cacheBackend;
}