You are here

function hook_event_dispatcher_cron in Hook Event Dispatcher 8

Implements hook_cron().

1 call to hook_event_dispatcher_cron()
CronEventTest::testCronEvent in tests/src/Unit/Cron/CronEventTest.php
Test the cron event.

File

./hook_event_dispatcher.module, line 846
Hook event dispatcher module.

Code

function hook_event_dispatcher_cron() {

  /** @var \Drupal\hook_event_dispatcher\Manager\HookEventDispatcherManagerInterface $manager */
  $manager = \Drupal::service('hook_event_dispatcher.manager');
  $event = new CronEvent();
  $manager
    ->register($event);
}