function MenuActiveTrail::resolveCacheMiss
Same name and namespace in other branches
- 9 core/lib/Drupal/Core/Menu/MenuActiveTrail.php \Drupal\Core\Menu\MenuActiveTrail::resolveCacheMiss()
- 8.9.x core/lib/Drupal/Core/Menu/MenuActiveTrail.php \Drupal\Core\Menu\MenuActiveTrail::resolveCacheMiss()
- 11.x core/lib/Drupal/Core/Menu/MenuActiveTrail.php \Drupal\Core\Menu\MenuActiveTrail::resolveCacheMiss()
Resolves a cache miss.
When an offset is not found in the object, this is treated as a cache miss. This method allows classes using this implementation to look up the actual value and allow it to be cached.
Parameters
string $key: The offset that was requested.
Return value
mixed The value of the offset, or NULL if no value was found.
Overrides CacheCollector::resolveCacheMiss
See also
::getActiveTrailIds()
File
-
core/
lib/ Drupal/ Core/ Menu/ MenuActiveTrail.php, line 70
Class
- MenuActiveTrail
- Provides the default implementation of the active menu trail service.
Namespace
Drupal\Core\MenuCode
protected function resolveCacheMiss($menu_name) {
$this->storage[$menu_name] = $this->doGetActiveTrailIds($menu_name);
$this->tags[] = 'config:system.menu.' . $menu_name;
$this->persist($menu_name);
return $this->storage[$menu_name];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.