function ElementInfoManager::clearCachedDefinitions

Same name in other branches
  1. 9 core/lib/Drupal/Core/Render/ElementInfoManager.php \Drupal\Core\Render\ElementInfoManager::clearCachedDefinitions()
  2. 8.9.x core/lib/Drupal/Core/Render/ElementInfoManager.php \Drupal\Core\Render\ElementInfoManager::clearCachedDefinitions()
  3. 10 core/lib/Drupal/Core/Render/ElementInfoManager.php \Drupal\Core\Render\ElementInfoManager::clearCachedDefinitions()

Overrides DefaultPluginManager::clearCachedDefinitions

File

core/lib/Drupal/Core/Render/ElementInfoManager.php, line 147

Class

ElementInfoManager
Provides a plugin manager for element plugins.

Namespace

Drupal\Core\Render

Code

public function clearCachedDefinitions() {
    $this->elementInfo = NULL;
    $cids = [];
    foreach ($this->themeHandler
        ->listInfo() as $theme_name => $info) {
        $cids[] = $this->getCid($theme_name);
    }
    $this->cacheBackend
        ->deleteMultiple($cids);
    parent::clearCachedDefinitions();
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.