Security update for Core, with self-updated composer
[yaffs-website] / web / core / lib / Drupal / Core / Cache / Context / RouteNameCacheContext.php
1 <?php
2
3 namespace Drupal\Core\Cache\Context;
4
5 /**
6  * Defines the RouteCacheContext service, for "per route name" caching.
7  *
8  * Cache context ID: 'route.name'.
9  */
10 class RouteNameCacheContext extends RouteCacheContext {
11
12   /**
13    * {@inheritdoc}
14    */
15   public static function getLabel() {
16     return t('Route name');
17   }
18
19   /**
20    * {@inheritdoc}
21    */
22   public function getContext() {
23     return $this->routeMatch->getRouteName();
24   }
25
26 }