Mercurial > hg > isophonics-drupal-site
view core/modules/layout_builder/src/Cache/LayoutBuilderUiCacheContext.php @ 19:fa3358dc1485 tip
Add ndrum files
author | Chris Cannam |
---|---|
date | Wed, 28 Aug 2019 13:14:47 +0100 |
parents | af1871eacc83 |
children |
line wrap: on
line source
<?php namespace Drupal\layout_builder\Cache; use Drupal\Core\Cache\Context\RouteNameCacheContext; /** * Determines if an entity is being viewed in the Layout Builder UI. * * Cache context ID: 'route.name.is_layout_builder_ui'. * * @internal * Tagged services are internal. */ class LayoutBuilderUiCacheContext extends RouteNameCacheContext { /** * {@inheritdoc} */ public static function getLabel() { return t('Layout Builder user interface'); } /** * {@inheritdoc} */ public function getContext() { return 'is_layout_builder_ui.' . (int) (strpos($this->routeMatch->getRouteName(), 'layout_builder.') !== 0); } }