function demo_cron in Demonstration site (Sandbox / Snapshot) 8
Same name and namespace in other branches
- 5 demo.module \demo_cron()
Implementation of hook_cron().
File
- ./
demo.module, line 832
Code
function demo_cron() {
if ($interval = \Drupal::config('demo.settings')
->get('demo_reset_interval', 0)) {
// See if it's time for a reset.
$request_time = \Drupal::time()
->getRequestTime();
if (\Drupal::time()
->getRequestTime() - $interval >= \Drupal::config('demo.settings')
->get('demo_reset_last', 0)) {
_demo_reset(\Drupal::config('demo.settings')
->get('demo_dump_cron', 'Set default value'), FALSE);
}
}
}