maintenanceMode = $maintenanceMode; parent::__construct(); } /** * Initialization of the command * * @return void */ protected function configure() { $this->setName('maintenance:status') ->setDescription('Displays maintenance mode status'); parent::configure(); } /** * {@inheritdoc} */ protected function execute(InputInterface $input, OutputInterface $output) { $output->writeln( 'Status: maintenance mode is ' . ($this->maintenanceMode->isOn() ? 'active' : 'not active') . '' ); $addressInfo = $this->maintenanceMode->getAddressInfo(); $addresses = implode(', ', $addressInfo); $output->writeln('List of exempt IP-addresses: ' . ($addresses ? $addresses : 'none') . ''); } }