class FooCacheContext
Same name and namespace in other branches
- 11.x core/tests/Drupal/Tests/Core/Cache/Context/CacheContextsManagerTest.php \Drupal\Tests\Core\Cache\Context\FooCacheContext
Fake cache context class.
Hierarchy
- class \Drupal\Tests\Core\Cache\Context\FooCacheContext extends \Drupal\Core\Cache\Context\CacheContextInterface
Expanded class hierarchy of FooCacheContext
File
-
core/
tests/ Drupal/ Tests/ Core/ Cache/ Context/ CacheContextsManagerTest.php, line 252
Namespace
Drupal\Tests\Core\Cache\ContextView source
class FooCacheContext implements CacheContextInterface {
/**
* {@inheritdoc}
*/
public static function getLabel() {
return 'Foo';
}
/**
* {@inheritdoc}
*/
public function getContext() {
return 'bar';
}
/**
* {@inheritdoc}
*/
public function getCacheableMetadata() {
return new CacheableMetadata();
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.