protected function execute(InputInterface $input, OutputInterface $output)
{
$moduleName = $input->getArgument('moduleName');
$recursive = $input->getOption('all');
if ($input->getOption('format') === null) {
$this->writeSection($output, sprintf(static::COMMAND_SECTION_TITLE_TEXT, $moduleName));
}
$this->detectMagento($output, true);
$this->initMagento();
try {
$dependencies = $this->findModuleDependencies($moduleName, $recursive);
if (!empty($dependencies)) {
usort($dependencies, array($this, 'sortDependencies'));
$this->getHelper('table')->setHeaders(array('Name', 'Status', 'Current installed version', 'Code pool'))->setPadType(STR_PAD_LEFT)->renderByFormat($output, $dependencies, $input->getOption('format'));
} else {
$output->writeln(sprintf(static::COMMAND_NO_RESULTS_TEXT, $moduleName));
}
} catch (Exception $e) {
$output->writeln($e->getMessage());
}
}