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