LayoutBuilderUiCacheContext.php in Drupal 9
File
core/modules/layout_builder/src/Cache/LayoutBuilderUiCacheContext.php
View source
<?php
namespace Drupal\layout_builder\Cache;
use Drupal\Core\Cache\Context\RouteNameCacheContext;
class LayoutBuilderUiCacheContext extends RouteNameCacheContext {
public static function getLabel() {
return t('Layout Builder user interface');
}
public function getContext() {
return 'is_layout_builder_ui.' . (int) (strpos($this->routeMatch
->getRouteName(), 'layout_builder.') !== 0);
}
}