class FooCacheContext in Drupal 10
Same name and namespace in other branches
- 8 core/tests/Drupal/Tests/Core/Cache/Context/CacheContextsManagerTest.php \Drupal\Tests\Core\Cache\Context\FooCacheContext
- 9 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 implements \Drupal\Core\Cache\Context\CacheContextInterface
Expanded class hierarchy of FooCacheContext
File
- core/
tests/ Drupal/ Tests/ Core/ Cache/ Context/ CacheContextsManagerTest.php, line 252 - Contains \Drupal\Tests\Core\Cache\Context\CacheContextsManagerTest.
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();
}
}