You are here

public function MenuItemRoleAccessLinkTreeManipulator::__construct in Menu Item Role Access 8

Same name and namespace in other branches
  1. 8.2 src/MenuItemRoleAccessLinkTreeManipulator.php \Drupal\menu_item_role_access\MenuItemRoleAccessLinkTreeManipulator::__construct()

Constructs a \Drupal\Core\Menu\DefaultMenuLinkTreeManipulators object.

Parameters

\Drupal\Core\Access\AccessManagerInterface $access_manager: The access manager.

\Drupal\Core\Session\AccountInterface $account: The current user.

\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: The entity type manager.

\Drupal\Core\Config\ConfigManagerInterface $config_manager: The configuration manager.

\Drupal\Core\Entity\EntityRepositoryInterface $entity_repository: An implementation of the entity repository interface.

Overrides DefaultMenuLinkTreeManipulators::__construct

File

src/MenuItemRoleAccessLinkTreeManipulator.php, line 50

Class

MenuItemRoleAccessLinkTreeManipulator
Defines the access control handler for the menu item.

Namespace

Drupal\menu_item_role_access

Code

public function __construct(AccessManagerInterface $access_manager, AccountInterface $account, EntityTypeManagerInterface $entity_type_manager, ConfigManagerInterface $config_manager, EntityRepositoryInterface $entity_repository) {
  parent::__construct($access_manager, $account, $entity_type_manager);
  $this->configManager = $config_manager
    ->getConfigFactory();
  $this->entityRepository = $entity_repository;
}