queue = $queue; } /** * Create an update task for Updater app * * @param array $packages * @param string $type * @param array $additionalOptions * @return string */ public function createUpdaterTask(array $packages, $type, array $additionalOptions = []) { try { // write to .update_queue.json file $params = []; if (!empty($packages)) { $params['components'] = $packages; } foreach ($additionalOptions as $key => $value) { $params[$key] = $value; } $this->queue->addJobs([['name' => $type, 'params' => $params]]); return ''; } catch (\Exception $e) { return $e->getMessage(); } } }