function CacheContextInterface::getLabel

Same name and namespace in other branches
  1. 11.x core/lib/Drupal/Core/Cache/Context/CacheContextInterface.php \Drupal\Core\Cache\Context\CacheContextInterface::getLabel()
  2. 10 core/lib/Drupal/Core/Cache/Context/CacheContextInterface.php \Drupal\Core\Cache\Context\CacheContextInterface::getLabel()
  3. 9 core/lib/Drupal/Core/Cache/Context/CacheContextInterface.php \Drupal\Core\Cache\Context\CacheContextInterface::getLabel()

Returns the label of the cache context.

Return value

string The label of the cache context.

2 methods override CacheContextInterface::getLabel()
NoOptimizeCacheContext::getLabel in core/tests/Drupal/Tests/Core/Cache/Context/CacheContextsManagerTest.php
Returns the label of the cache context.
RouteCacheContext::getLabel in core/lib/Drupal/Core/Cache/Context/RouteCacheContext.php
Returns the label of the cache context.

File

core/lib/Drupal/Core/Cache/Context/CacheContextInterface.php, line 16

Class

CacheContextInterface
Provides an interface for defining a cache context service.

Namespace

Drupal\Core\Cache\Context

Code

public static function getLabel();

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.