lists = $lists; parent::__construct(); } /** * {@inheritdoc} */ protected function configure() { $this->setName('info:currency:list') ->setDescription('Displays the list of available currencies'); parent::configure(); } /** * {@inheritdoc} */ protected function execute(InputInterface $input, OutputInterface $output) { $table = $this->getHelperSet()->get('table'); $table->setHeaders(['Currency', 'Code']); foreach ($this->lists->getCurrencyList() as $key => $currency) { $table->addRow([$currency, $key]); } $table->render($output); } }