You are here

public function GroupRelationManager::clearCachedPluginMaps in Group 2.0.x

Clears static and persistent plugin ID map caches.

Overrides GroupRelationManagerInterface::clearCachedPluginMaps

File

src/Plugin/Group/Relation/GroupRelationManager.php, line 461

Class

GroupRelationManager
Manages GroupRelation plugin implementations.

Namespace

Drupal\group\Plugin\Group\Relation

Code

public function clearCachedPluginMaps() {
  if ($this->cacheBackend) {
    $this->cacheBackend
      ->delete($this->pluginGroupContentTypeMapCacheKey);
    $this->cacheBackend
      ->delete($this->groupTypePluginMapCacheKey);
  }
  $this->pluginGroupContentTypeMap = NULL;
  $this->groupTypePluginMap = NULL;

  // Also clear the array of per group type plugin collections as it shares
  // its cache clearing requirements with the group type plugin map.
  $this->groupTypeInstalled = [];
}