N98\Magento\Command\System\Website\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 ($input->getOption('format') === null) {
            $this->writeSection($output, 'Magento Websites');
        }
        $this->initMagento();
        foreach (\Mage::app()->getWebsites() as $store) {
            $table[$store->getId()] = array($store->getId(), $store->getCode());
        }
        ksort($table);
        $this->getHelper('table')->setHeaders(array('id', 'code'))->renderByFormat($output, $table, $input->getOption('format'));
    }