setName("ot:site:just-make-it-work") ->setDescription("Forces the website to be updated / restored / created, according to its state") ->setHelp("Call this method by giving it the organization's id in the Opentalent DB. If no site exists, it will create it; If the site has been deleted, it will restore it; If a site already exists, it will update it. This command will also remove any redirections that may have been set on the domain.") ->addArgument( 'organization-id', InputArgument::REQUIRED, "The organization's id in the opentalent DB" )->addOption( 'dev', null, InputOption::VALUE_NONE, "Add this option to get url like 'http://host/subdomain' instead of 'http://subdomain.host'" ); } /** * -- This method is expected by Typo3, do not rename ou remove -- * * @param InputInterface $input * @param OutputInterface $output * @return int * @throws \Exception */ protected function execute(InputInterface $input, OutputInterface $output): int { $org_id = $input->getArgument('organization-id'); $io = new SymfonyStyle($input, $output); $rootUid = $this->siteController->justeMakeItWorkSiteAction($org_id); $io->success(sprintf("The website has been updated / restored / created (root page uid=" . $rootUid . ')')); return 0; } }