public function BaseUpdateRunner::addUpdatesToQueue in Scheduled Updates 8
Add all updates to queue.
Overrides UpdateRunnerInterface::addUpdatesToQueue
File
- src/
Plugin/ BaseUpdateRunner.php, line 132 - Contains \Drupal\scheduled_updates\Plugin\BaseUpdateRunner.
Class
Namespace
Drupal\scheduled_updates\PluginCode
public function addUpdatesToQueue() {
$updates = $this
->getAllUpdates();
if ($updates) {
$queue = $this
->getQueue();
foreach ($updates as $update) {
$queue
->createItem($update);
/** @var ScheduledUpdate $update */
$update = ScheduledUpdate::load($update['update_id']);
$update->status = ScheduledUpdateInterface::STATUS_INQUEUE;
$update
->save();
}
}
}