You are here

public function ScheduledTransitionsHooks::cron in Scheduled Transitions 2.x

Same name and namespace in other branches
  1. 8 src/ScheduledTransitionsHooks.php \Drupal\scheduled_transitions\ScheduledTransitionsHooks::cron()

Implements hook_cron().

See also

\scheduled_transitions_cron()

File

src/ScheduledTransitionsHooks.php, line 58

Class

ScheduledTransitionsHooks
Hooks for Scheduled Transitions module.

Namespace

Drupal\scheduled_transitions

Code

public function cron() : void {
  $settings = $this->configFactory
    ->get('scheduled_transitions.settings');
  if (!empty($settings
    ->get('automation.cron_create_queue_items'))) {
    $this->scheduledTransitionsJobs
      ->jobCreator();
  }
}