function ContextualLinkManager::clearCachedDefinitions

Same name in other branches
  1. 11.x core/lib/Drupal/Core/Menu/ContextualLinkManager.php \Drupal\Core\Menu\ContextualLinkManager::clearCachedDefinitions()

Overrides DefaultPluginManager::clearCachedDefinitions

File

core/lib/Drupal/Core/Menu/ContextualLinkManager.php, line 205

Class

ContextualLinkManager
Defines a contextual link plugin manager to deal with contextual links.

Namespace

Drupal\Core\Menu

Code

public function clearCachedDefinitions() {
    $cids = [];
    foreach ($this->languageManager
        ->getLanguages() as $language) {
        $cids[] = 'contextual_links_plugins:' . $language->getId();
    }
    $this->cacheBackend
        ->deleteMultiple($cids);
    $this->definitions = NULL;
}

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