Update talk next event date on cron

Run the `TalkDateUpater` service on each cron run to ensure that the
next event date for each talk is up to date.

Fixes #204
This commit is contained in:
Oliver Davies 2020-08-24 00:07:44 +01:00
parent 6d9ecd8df0
commit e4e898f22c

View file

@ -7,6 +7,16 @@
declare(strict_types=1);
use Drupal\opd_talks\Service\TalkDateUpdater;
/**
* Implements hook_cron().
*/
function opd_talks_cron(): void {
$dateUpdater = Drupal::service(TalkDateUpdater::class);
$dateUpdater->__invoke();
}
/**
* Implements hook_views_data_alter().
*/