function RouteNameCacheContext::getContext
Same name in other branches
- 9 core/lib/Drupal/Core/Cache/Context/RouteNameCacheContext.php \Drupal\Core\Cache\Context\RouteNameCacheContext::getContext()
- 10 core/lib/Drupal/Core/Cache/Context/RouteNameCacheContext.php \Drupal\Core\Cache\Context\RouteNameCacheContext::getContext()
- 11.x core/lib/Drupal/Core/Cache/Context/RouteNameCacheContext.php \Drupal\Core\Cache\Context\RouteNameCacheContext::getContext()
Overrides RouteCacheContext::getContext
1 method overrides RouteNameCacheContext::getContext()
- LayoutBuilderUiCacheContext::getContext in core/
modules/ layout_builder/ src/ Cache/ LayoutBuilderUiCacheContext.php - Returns the string representation of the cache context.
File
-
core/
lib/ Drupal/ Core/ Cache/ Context/ RouteNameCacheContext.php, line 22
Class
- RouteNameCacheContext
- Defines the RouteCacheContext service, for "per route name" caching.
Namespace
Drupal\Core\Cache\ContextCode
public function getContext() {
return $this->routeMatch
->getRouteName();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.