setName("ot:site:update") ->setDescription("Update an organization website") ->setHelp("This CLI command update an existing organization's website with the latest data from the Opentalent DB") ->addArgument( 'organization-id', InputArgument::REQUIRED, "The organization's id in the opentalent DB" ); } /** * -- This method is expected by Typo3, do not rename ou remove -- * * @param InputInterface $input * @param OutputInterface $output * @throws \Exception */ protected function execute(InputInterface $input, OutputInterface $output) { $org_id = $input->getArgument('organization-id'); $io = new SymfonyStyle($input, $output); $siteController = GeneralUtility::makeInstance(ObjectManager::class)->get(SiteController::class); $rootUid = $siteController->updateSiteConstantsAction($org_id); $io->success(sprintf("The website with root uid " . $rootUid . " has been updated")); } }