constant PirateDayCacheContext::PIRATE_DAY_MAX_AGE in Drupal 10
Same name and namespace in other branches
- 8 core/modules/config/tests/config_override_test/src/Cache/PirateDayCacheContext.php \Drupal\config_override_test\Cache\PirateDayCacheContext::PIRATE_DAY_MAX_AGE
- 9 core/modules/config/tests/config_override_test/src/Cache/PirateDayCacheContext.php \Drupal\config_override_test\Cache\PirateDayCacheContext::PIRATE_DAY_MAX_AGE
The length of Pirate Day. It lasts 24 hours.
This is a simplified test implementation. In a real life Pirate Day module this data wouldn't be defined in a constant, but calculated in a static method. If it were Pirate Day it should return the number of seconds until midnight, and on all other days it should return the number of seconds until the start of the next Pirate Day.
File
- core/
modules/ config/ tests/ config_override_test/ src/ Cache/ PirateDayCacheContext.php, line 24
Class
- PirateDayCacheContext
- Defines the PirateDayCacheContext service that allows to cache the booty.
Namespace
Drupal\config_override_test\CacheCode
const PIRATE_DAY_MAX_AGE = 86400;