function PirateDayCacheContext::getContext
Same name in other branches
- 9 core/modules/config/tests/config_override_test/src/Cache/PirateDayCacheContext.php \Drupal\config_override_test\Cache\PirateDayCacheContext::getContext()
- 8.9.x core/modules/config/tests/config_override_test/src/Cache/PirateDayCacheContext.php \Drupal\config_override_test\Cache\PirateDayCacheContext::getContext()
- 10 core/modules/config/tests/config_override_test/src/Cache/PirateDayCacheContext.php \Drupal\config_override_test\Cache\PirateDayCacheContext::getContext()
Overrides CacheContextInterface::getContext
File
-
core/
modules/ config/ tests/ config_override_test/ src/ Cache/ PirateDayCacheContext.php, line 40
Class
- PirateDayCacheContext
- Defines the PirateDayCacheContext service that allows to cache the booty.
Namespace
Drupal\config_override_test\CacheCode
public function getContext() {
$is_pirate_day = static::isPirateDay() ? 'yarr' : 'nay';
return "pirate_day." . $is_pirate_day;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.