N98\Magento\Command\Developer\Module\Disableenable\AbstractCommand::execute PHP Method

execute() protected method

Execute command
protected execute ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output ) : void
$input Symfony\Component\Console\Input\InputInterface
$output Symfony\Component\Console\Output\OutputInterface
return void
    protected function execute(InputInterface $input, OutputInterface $output)
    {
        $this->detectMagento($output, true);
        if (false === $this->initMagento()) {
            throw new RuntimeException('Magento could not be loaded');
        }
        $this->config = \Mage::getConfig();
        $this->modulesDir = $this->config->getOptions()->getEtcDir() . DS . 'modules' . DS;
        if ($codePool = $input->getOption('codepool')) {
            $output->writeln('<info>' . ($this->commandName == 'enable' ? 'Enabling' : 'Disabling') . ' modules in <comment>' . $codePool . '</comment> codePool...</info>');
            $this->enableCodePool($codePool, $output);
        } elseif ($module = $input->getArgument('moduleName')) {
            $this->enableModule($module, $output);
        } else {
            throw new InvalidArgumentException('No code-pool option nor module-name argument');
        }
    }