/**
* Internal function to execute the command.
*
* @param InputInterface $input The input to inject into the command.
* @param OutputInterface $output The output to inject into the command.
*
* @return integer The command exit code
*
* @since 4.0.0
*/
protected function doExecute(InputInterface $input, OutputInterface $output) : int
{
$this->configureIO($input, $output);
$returnCode = $this->getApplication()->getCommand(SetConfigurationCommand::getDefaultName())->execute(new ArrayInput(['options' => ['offline=true']]), $output);
if ($returnCode === 0) {
$this->ioStyle->success("Website is now offline");
return self::SITE_DOWN_SUCCESSFUL;
}
return self::SITE_DOWN_FAILED;
}