You are here

public function GroupRelationManager::__construct in Group 2.0.x

Constructs a GroupRelationManager 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/Group/Relation/GroupRelationManager.php, line 111

Class

GroupRelationManager
Manages GroupRelation plugin implementations.

Namespace

Drupal\group\Plugin\Group\Relation

Code

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