You are here

public function GroupContentEnablerManager::__construct in Group 8

Constructs a GroupContentEnablerManager 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\Entity\EntityTypeManagerInterface $entity_type_manager: The entity type manager.

Overrides DefaultPluginManager::__construct

File

src/Plugin/GroupContentEnablerManager.php, line 111

Class

GroupContentEnablerManager
Manages GroupContentEnabler plugin implementations.

Namespace

Drupal\group\Plugin

Code

public function __construct(\Traversable $namespaces, CacheBackendInterface $cache_backend, ModuleHandlerInterface $module_handler, EntityTypeManagerInterface $entity_type_manager) {
  parent::__construct('Plugin/GroupContentEnabler', $namespaces, $module_handler, 'Drupal\\group\\Plugin\\GroupContentEnablerInterface', 'Drupal\\group\\Annotation\\GroupContentEnabler');
  $this
    ->alterInfo('group_content_info');
  $this
    ->setCacheBackend($cache_backend, 'group_content_enablers');
  $this->entityTypeManager = $entity_type_manager;
  $this->pluginGroupContentTypeMapCacheKey = $this->cacheKey . '_GCT_map';
  $this->groupTypePluginMapCacheKey = $this->cacheKey . '_GT_map';
}