Upgraded drupal core with security updates
[yaffs-website] / web / core / modules / system / tests / modules / entity_test / src / Cache / EntityTestViewGrantsCacheContext.php
1 <?php
2
3 namespace Drupal\entity_test\Cache;
4
5 use Drupal\Core\Cache\CacheableMetadata;
6 use Drupal\Core\Cache\Context\CacheContextInterface;
7
8 /**
9  * Defines the entity_test view grants cache context service.
10  *
11  * Cache context ID: 'entity_test_view_grants'.
12  *
13  * @see \Drupal\node\Cache\NodeAccessViewGrantsCacheContext
14  */
15 class EntityTestViewGrantsCacheContext implements CacheContextInterface {
16
17   /**
18    * {@inheritdoc}
19    */
20   public static function getLabel() {
21     return t("Entity test view grants");
22   }
23
24   /**
25    * {@inheritdoc}
26    */
27   public function getContext() {
28     // Return a constant value, so we can fetch render cache both in actual
29     // requests and test code itself.
30     return '299792458';
31   }
32
33   /**
34    * {@inheritdoc}
35    */
36   public function getCacheableMetadata() {
37     return new CacheableMetadata();
38   }
39
40 }