You are here

public function ManagedRolePermissionsManager::__construct in farmOS 2.x

Constructs a ManagedRolePermissionsManager object.

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 to invoke the alter hook with.

\Drupal\Core\Controller\ControllerResolverInterface $controller_resolver: The controller resolver service.

\Drupal\Core\Entity\EntityTypeBundleInfoInterface $entity_type_bundle_info: The entity type bundle info service.

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

Overrides DefaultPluginManager::__construct

File

modules/core/role/src/ManagedRolePermissionsManager.php, line 79

Class

ManagedRolePermissionsManager
ManagedRolePermissions Plugin Manager.

Namespace

Drupal\farm_role

Code

public function __construct(\Traversable $namespaces, CacheBackendInterface $cache_backend, ModuleHandlerInterface $module_handler, ControllerResolverInterface $controller_resolver, EntityTypeBundleInfoInterface $entity_type_bundle_info, EntityTypeManagerInterface $entity_type_manager) {
  parent::__construct('Plugin/ManagedRolePermissions', $namespaces, $module_handler);
  $this->controllerResolver = $controller_resolver;
  $this->entityTypeBundleInfo = $entity_type_bundle_info;
  $this->entityTypeManager = $entity_type_manager;
  $this->rolePermissions = [];
  $this
    ->setCacheBackend($cache_backend, 'managed_role_permissions_plugins');
}