protected function execute(InputInterface $input, OutputInterface $output)
{
$this->output = $output;
$this->modmanMode = $input->getOption('modman');
if ($input->getOption('add-all')) {
$input->setOption('add-controllers', true);
$input->setOption('add-blocks', true);
$input->setOption('add-helpers', true);
$input->setOption('add-models', true);
$input->setOption('add-setup', true);
$input->setOption('add-readme', true);
$input->setOption('add-composer', true);
}
if (!$this->modmanMode) {
$this->detectMagento($output);
}
$this->baseFolder = __DIR__ . '/../../../../../../res/module/create';
$this->vendorNamespace = ucfirst($input->getArgument('vendorNamespace'));
$this->moduleName = ucfirst($input->getArgument('moduleName'));
$this->codePool = $input->getArgument('codePool');
if (!in_array($this->codePool, array('local', 'community'))) {
throw new InvalidArgumentException('Code pool must "community" or "local"');
}
$this->initView($input);
$this->createModuleDirectories($input, $output);
$this->writeEtcModules($output);
$this->writeModuleConfig($output);
$this->writeReadme($input, $output);
if ($this->modmanMode) {
$this->writeModmanFile($output);
}
$this->writeComposerConfig($input, $output);
$this->addAdditionalFiles($output);
}