You are here

public function GroupContentEnablerManager::clearCachedPluginMaps in Group 8

Clears static and persistent plugin ID map caches.

Overrides GroupContentEnablerManagerInterface::clearCachedPluginMaps

File

src/Plugin/GroupContentEnablerManager.php, line 466

Class

GroupContentEnablerManager
Manages GroupContentEnabler plugin implementations.

Namespace

Drupal\group\Plugin

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 = [];
}