PirateDayCacheContext::PIRATE_DAY_MAX_AGE

Same name in other branches
  1. 9 core/modules/config/tests/config_override_test/src/Cache/PirateDayCacheContext.php \Drupal\config_override_test\Cache\PirateDayCacheContext::PIRATE_DAY_MAX_AGE
  2. 10 core/modules/config/tests/config_override_test/src/Cache/PirateDayCacheContext.php \Drupal\config_override_test\Cache\PirateDayCacheContext::PIRATE_DAY_MAX_AGE
  3. 11.x 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\Cache

Code

const PIRATE_DAY_MAX_AGE = 86400;

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.