setName("ot:site:status") ->setDescription("Displays the current state of a given website") ->setHelp("This CLI command returns a status code representing the current state of a given website") ->addOption( 'full', null, InputOption::VALUE_NONE, "Performs a full scan" ) ->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'); $full = $input->getOption('full'); $io = new SymfonyStyle($input, $output); $siteController = GeneralUtility::makeInstance(ObjectManager::class)->get(SiteController::class); $status = $siteController->getSiteStatusAction($org_id, $full); $io->success(sprintf("Status of the website: " . var_dump($status))); } }