You are here

public function WorkbenchAccessManager::__construct in Workbench Access 8

Constructs a new WorkbenchAccessManager.

Parameters

\Traversable $namespaces: An object that implements \Traversable which contains the root paths keyed by the corresponding namespace to look for plugin implementations.

\Drupal\Core\Cache\CacheBackendInterface $cache_backend: Cache backend instance to use.

\Drupal\Core\Extension\ModuleHandlerInterface $module_handler: The module handler.

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

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

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

\Drupal\Core\Session\AccountInterface $currentUser: Current user.

Overrides DefaultPluginManager::__construct

File

src/WorkbenchAccessManager.php, line 74

Class

WorkbenchAccessManager
Defines a class for interacting with content and fields.

Namespace

Drupal\workbench_access

Code

public function __construct(\Traversable $namespaces, CacheBackendInterface $cache_backend, ModuleHandlerInterface $module_handler, EntityTypeManagerInterface $entityTypeManager, UserSectionStorageInterface $user_section_storage, ConfigFactoryInterface $configFactory, AccountInterface $currentUser) {
  parent::__construct('Plugin/AccessControlHierarchy', $namespaces, $module_handler, 'Drupal\\workbench_access\\AccessControlHierarchyInterface', 'Drupal\\workbench_access\\Annotation\\AccessControlHierarchy');
  $this
    ->alterInfo('workbench_access_info');
  $this
    ->setCacheBackend($cache_backend, 'workbench_access_plugins');
  $this->moduleHandler = $module_handler;
  $this->namespaces = $namespaces;
  $this->userSectionStorage = $user_section_storage;
  $this->configFactory = $configFactory;
  $this->currentUser = $currentUser;
  $this->entityTypeManager = $entityTypeManager;
}