public function UpdateRunnerUtils::getUpdateRunnerInstance in Scheduled Updates 8
Get the Runner Plugin Instance for a Type.
Parameters
\Drupal\scheduled_updates\ScheduledUpdateTypeInterface $scheduledUpdateType:
Return value
null|object
1 call to UpdateRunnerUtils::getUpdateRunnerInstance()
- UpdateRunnerUtils::getUpdateTypeRunners in src/
UpdateRunnerUtils.php - Get update runner for scheduled update types.
File
- src/
UpdateRunnerUtils.php, line 107 - Contains \Drupal\scheduled_updates\UpdateRunnerUtils.
Class
- UpdateRunnerUtils
- A service that runs all available updaters
Namespace
Drupal\scheduled_updatesCode
public function getUpdateRunnerInstance(ScheduledUpdateTypeInterface $scheduledUpdateType) {
$runner_settings = $scheduledUpdateType
->getUpdateRunnerSettings();
$runner_settings['updater_type'] = $scheduledUpdateType
->id();
if ($this->runnerManager
->hasDefinition($runner_settings['id'])) {
return $this->runnerManager
->createInstance($runner_settings['id'], $runner_settings);
}
return NULL;
}