user->isAdmin(); } public function postActionRebuild(): bool { $this->getContainer()->get('dataManager')->rebuild(); return true; } public function postActionClearCache(): bool { $this->getContainer()->get('dataManager')->clearCache(); return true; } public function getActionJobs() { $scheduledJob = $this->getContainer()->get('scheduledJob'); return $scheduledJob->getAvailableList(); } public function postActionUploadUpgradePackage($params, $data) { if ($this->config->get('restrictedMode')) { if (!$this->user->isSuperAdmin()) { throw new Forbidden(); } } $upgradeManager = new UpgradeManager($this->getContainer()); $upgradeId = $upgradeManager->upload($data); $manifest = $upgradeManager->getManifest(); return [ 'id' => $upgradeId, 'version' => $manifest['version'], ]; } public function postActionRunUpgrade($params, $data): bool { if ($this->config->get('restrictedMode')) { if (!$this->user->isSuperAdmin()) { throw new Forbidden(); } } $upgradeManager = new UpgradeManager($this->getContainer()); $upgradeManager->install(get_object_vars($data)); return true; } public function actionCronMessage() { return $this->getContainer()->get('scheduledJob')->getSetupMessage(); } public function actionAdminNotificationList() { $adminNotificationManager = new AdminNotificationManager($this->getContainer()); return $adminNotificationManager->getNotificationList(); } public function actionSystemRequirementList() { $systemRequirementManager = new SystemRequirements($this->getContainer()); return $systemRequirementManager->getAllRequiredList(); } }