src/TweedeGolf/Generator/Console/GenerateCommand.php
protected function showGeneratorList(OutputInterface $output)
    {
        $output->writeln("<comment>Available generators:</comment>");
        $helpCommand = "<info>{$this->getName()} help [generator]</info>";
        $output->writeln("Use {$helpCommand} for more information on each generator.");

        $rows = [];

        /** @var GeneratorInterface $generator */
        foreach ($this->dispatcher->getRegistry()->getGenerators() as $generator) {
            $rows[] = array("<info>{$generator->getName()}</info>", $generator->getDescription());
        }

        /** @var TableHelper $table */
        $table = $this->getHelper('table');
        $table->setLayout(TableHelper::LAYOUT_BORDERLESS);
        $table->setHorizontalBorderChar('');
        $table->setRows($rows);
        $table->render($output);
    }
protected function showGeneratorList(OutputInterface $output)
    {
        $output->writeln("<comment>Available generators:</comment>");
        $helpCommand = "<info>{$this->getName()} help [generator]</info>";
        $output->writeln("Use {$helpCommand} for more information on each generator.");

        $rows = [];

        /** @var GeneratorInterface $generator */
        foreach ($this->dispatcher->getRegistry()->getGenerators() as $generator) {
            $rows[] = array("<info>{$generator->getName()}</info>", $generator->getDescription());
        }

        /** @var TableHelper $table */
        $table = $this->getHelper('table');
        $table->setLayout(TableHelper::LAYOUT_BORDERLESS);
        $table->setHorizontalBorderChar('');
        $table->setRows($rows);
        $table->render($output);
    }
protected function showGeneratorList ( OutputInterface $ output ) { $ output -> writeln ( "<comment>Available generators:</comment>" ) ; $ helpCommand = "<info>{$this->getName()} help [generator]</info>" ; $ output -> writeln ( "Use {$helpCommand} for more information on each generator." ) ; $ rows = [ ] ; /** @var GeneratorInterface $generator */ foreach ( $ this -> dispatcher -> getRegistry ( ) -> getGenerators ( ) as $ generator ) { $ rows [ ] = array ( "<info>{$generator->getName()}</info>" , $ generator -> getDescription ( ) ) ; } /** @var TableHelper $table */ $ table = $ this -> getHelper ( 'table' ) ; $ table -> setLayout ( TableHelper :: LAYOUT_BORDERLESS ) ; $ table -> setHorizontalBorderChar ( '' ) ; $ table -> setRows ( $ rows ) ; $ table -> render ( $ output ) ; }
Show the list of generators available.
@param OutputInterface $output
Show the list of generators available .