You are here

public function BreakpointManager::clearCachedDefinitions in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/breakpoint/src/BreakpointManager.php \Drupal\breakpoint\BreakpointManager::clearCachedDefinitions()
  2. 10 core/modules/breakpoint/src/BreakpointManager.php \Drupal\breakpoint\BreakpointManager::clearCachedDefinitions()

Clears static and persistent plugin definition caches.

Don't resort to calling \Drupal::cache()->delete() and friends to make Drupal detect new or updated plugin definitions. Always use this method on the appropriate plugin type's plugin manager!

Overrides DefaultPluginManager::clearCachedDefinitions

File

core/modules/breakpoint/src/BreakpointManager.php, line 229

Class

BreakpointManager
Defines a breakpoint plugin manager to deal with breakpoints.

Namespace

Drupal\breakpoint

Code

public function clearCachedDefinitions() {
  parent::clearCachedDefinitions();
  $this->breakpointsByGroup = NULL;
  $this->instances = [];
}