/** * @param StartupTaskInterface $task * @param array $manual * @return null */ public function runTask(StartupTaskInterface $task, array $manual = null) { if (null === $manual) { $params = $this->collectFromRegistry($task->getRegistryKeys()); } else { $params = $manual; } $task->execute($params); }
/** * Collects data keys out of the configuration registry and uses them to * execute the task. This is a way to run the task without needing to have * access to the route or context. * * @param StartupTaskInterface $task * @return null */ public function runTask(StartupTaskInterface $task) { $data = null; $keys = $task->getDataKeys(); if (!empty($keys)) { $data = $this->collectFromRegistry($keys); } $task->execute($data); $this->addTaskStatus(get_class($task), $task->getStatus()); }
/** * @param StartupTaskInterface $task * @param array $manual * @return null */ public function runTask(StartupTaskInterface $task, array $params) { $task->execute($params); }