Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. DefaultPluginManager.php

function DefaultPluginManager::clearCachedDefinitions

Overrides CachedDiscoveryInterface::clearCachedDefinitions

12 calls to DefaultPluginManager::clearCachedDefinitions()
BreakpointManager::clearCachedDefinitions in core/modules/breakpoint/src/BreakpointManager.php
Clears static and persistent plugin definition caches.
BreakpointManager::clearCachedDefinitions in core/modules/breakpoint/src/BreakpointManager.php
Clears static and persistent plugin definition caches.
ComponentPluginManager::clearCachedDefinitions in core/lib/Drupal/Core/Theme/ComponentPluginManager.php
Clears static and persistent plugin definition caches.
ComponentPluginManager::clearCachedDefinitions in core/lib/Drupal/Core/Theme/ComponentPluginManager.php
Clears static and persistent plugin definition caches.
ElementInfoManager::clearCachedDefinitions in core/lib/Drupal/Core/Render/ElementInfoManager.php
Clears static and persistent plugin definition caches.

... See full list

9 methods override DefaultPluginManager::clearCachedDefinitions()
BreakpointManager::clearCachedDefinitions in core/modules/breakpoint/src/BreakpointManager.php
Clears static and persistent plugin definition caches.
ComponentPluginManager::clearCachedDefinitions in core/lib/Drupal/Core/Theme/ComponentPluginManager.php
Clears static and persistent plugin definition caches.
ConfigMapperManager::clearCachedDefinitions in core/modules/config_translation/src/ConfigMapperManager.php
Clears static and persistent plugin definition caches.
ContextualLinkManager::clearCachedDefinitions in core/lib/Drupal/Core/Menu/ContextualLinkManager.php
Clears static and persistent plugin definition caches.
ElementInfoManager::clearCachedDefinitions in core/lib/Drupal/Core/Render/ElementInfoManager.php
Clears static and persistent plugin definition caches.

... See full list

File

core/lib/Drupal/Core/Plugin/DefaultPluginManager.php, line 222

Class

DefaultPluginManager
Base class for plugin managers.

Namespace

Drupal\Core\Plugin

Code

public function clearCachedDefinitions() {
    if ($this->cacheBackend) {
        if ($this->cacheTags) {
            // Use the cache tags to clear the cache.
            Cache::invalidateTags($this->cacheTags);
        }
        else {
            $this->cacheBackend
                ->delete($this->cacheKey);
        }
    }
    if ($this->discovery instanceof CachedDiscoveryInterface) {
        $this->discovery
            ->clearCachedDefinitions();
    }
    $this->definitions = NULL;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal