N98\Magento\Command\Developer\Module\Rewrite\ListCommand::execute PHP Method

execute() protected method

protected execute ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output ) : integer | void
$input Symfony\Component\Console\Input\InputInterface
$output Symfony\Component\Console\Output\OutputInterface
return integer | void
    protected function execute(InputInterface $input, OutputInterface $output)
    {
        $this->detectMagento($output, true);
        if (!$this->initMagento()) {
            return;
        }
        $rewrites = array_merge($this->loadRewrites(), $this->loadAutoloaderRewrites());
        $table = array();
        foreach ($rewrites as $type => $data) {
            if (count($data) > 0) {
                foreach ($data as $class => $rewriteClass) {
                    $table[] = array($type, $class, implode(', ', $rewriteClass));
                }
            }
        }
        if (count($table) === 0 && $input->getOption('format') === null) {
            $output->writeln('<info>No rewrites were found.</info>');
        } else {
            if (count($table) == 0) {
                $table = array();
            }
            $this->getHelper('table')->setHeaders(array('Type', 'Class', 'Rewrite'))->setRows($table)->renderByFormat($output, $table, $input->getOption('format'));
        }
    }