Pimcore\Console\AbstractCommand::initialize PHP Method

initialize() protected method

protected initialize ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output )
$input Symfony\Component\Console\Input\InputInterface
$output Symfony\Component\Console\Output\OutputInterface
    protected function initialize(InputInterface $input, OutputInterface $output)
    {
        parent::initialize($input, $output);
        $this->input = $input;
        $this->output = $output;
        $this->initializeLogging();
        // use Console\Dumper for nice debug output
        $this->dumper = new Dumper($this->output);
        // skip if maintenance mode is on and the flag is not set
        if (Admin::isInMaintenanceMode() && !$input->getOption('ignore-maintenance-mode')) {
            //throw new \RuntimeException('In maintenance mode - set the flag --ignore-maintenance-mode to force execution!');
        }
    }

Usage Example

 protected function initialize(InputInterface $input, OutputInterface $output)
 {
     parent::initialize($input, $output);
     $this->initializePimcoreLogging();
 }
All Usage Examples Of Pimcore\Console\AbstractCommand::initialize