function LayoutBuilderUiCacheContext::getContext
Same name in other branches
- 9 core/modules/layout_builder/src/Cache/LayoutBuilderUiCacheContext.php \Drupal\layout_builder\Cache\LayoutBuilderUiCacheContext::getContext()
- 10 core/modules/layout_builder/src/Cache/LayoutBuilderUiCacheContext.php \Drupal\layout_builder\Cache\LayoutBuilderUiCacheContext::getContext()
- 11.x core/modules/layout_builder/src/Cache/LayoutBuilderUiCacheContext.php \Drupal\layout_builder\Cache\LayoutBuilderUiCacheContext::getContext()
Overrides RouteNameCacheContext::getContext
File
-
core/
modules/ layout_builder/ src/ Cache/ LayoutBuilderUiCacheContext.php, line 27
Class
- LayoutBuilderUiCacheContext
- Determines if an entity is being viewed in the Layout Builder UI.
Namespace
Drupal\layout_builder\CacheCode
public function getContext() {
return 'is_layout_builder_ui.' . (int) (strpos($this->routeMatch
->getRouteName(), 'layout_builder.') !== 0);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.