function PirateDayCacheContext::isPirateDay
Same name in other branches
- 9 core/modules/config/tests/config_override_test/src/Cache/PirateDayCacheContext.php \Drupal\config_override_test\Cache\PirateDayCacheContext::isPirateDay()
- 8.9.x core/modules/config/tests/config_override_test/src/Cache/PirateDayCacheContext.php \Drupal\config_override_test\Cache\PirateDayCacheContext::isPirateDay()
- 10 core/modules/config/tests/config_override_test/src/Cache/PirateDayCacheContext.php \Drupal\config_override_test\Cache\PirateDayCacheContext::isPirateDay()
Returns whether or not it is Pirate Day.
To ease testing this is determined with a global variable rather than using the traditional compass and sextant.
Return value
bool Returns TRUE if it is Pirate Day today.
2 calls to PirateDayCacheContext::isPirateDay()
- PirateDayCacheabilityMetadataConfigOverride::loadOverrides in core/
modules/ config/ tests/ config_override_test/ src/ PirateDayCacheabilityMetadataConfigOverride.php - PirateDayCacheContext::getContext in core/
modules/ config/ tests/ config_override_test/ src/ Cache/ PirateDayCacheContext.php - Returns the string representation of the cache context.
File
-
core/
modules/ config/ tests/ config_override_test/ src/ Cache/ PirateDayCacheContext.php, line 54
Class
- PirateDayCacheContext
- Defines the PirateDayCacheContext service that allows to cache the booty.
Namespace
Drupal\config_override_test\CacheCode
public static function isPirateDay() {
return !empty($GLOBALS['it_is_pirate_day']);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.