[ Index ] |
PHP Cross Reference of phpBB-3.1.12-deutsch |
[Summary view] [Print] [Text view]
1 <?php 2 /** 3 * 4 * This file is part of the phpBB Forum Software package. 5 * 6 * @copyright (c) phpBB Limited <https://www.phpbb.com> 7 * @license GNU General Public License, version 2 (GPL-2.0) 8 * 9 * For full copyright and license information, please see 10 * the docs/CREDITS.txt file. 11 * 12 */ 13 namespace phpbb\console\command\extension; 14 15 use Symfony\Component\Console\Input\InputInterface; 16 use Symfony\Component\Console\Output\OutputInterface; 17 18 class show extends command 19 { 20 protected function configure() 21 { 22 $this 23 ->setName('extension:show') 24 ->setDescription($this->user->lang('CLI_DESCRIPTION_LIST_EXTENSIONS')) 25 ; 26 } 27 28 protected function execute(InputInterface $input, OutputInterface $output) 29 { 30 $this->manager->load_extensions(); 31 $all = array_keys($this->manager->all_available()); 32 33 if (empty($all)) 34 { 35 $output->writeln('<comment>' . $this->user->lang('CLI_EXTENSION_NOT_FOUND') . '</comment>'); 36 return 3; 37 } 38 39 $enabled = array_keys($this->manager->all_enabled()); 40 $this->print_extension_list($output, $this->user->lang('CLI_EXTENSIONS_ENABLED') . $this->user->lang('COLON'), $enabled); 41 42 $output->writeln(''); 43 44 $disabled = array_keys($this->manager->all_disabled()); 45 $this->print_extension_list($output, $this->user->lang('CLI_EXTENSIONS_DISABLED') . $this->user->lang('COLON'), $disabled); 46 47 $output->writeln(''); 48 49 $purged = array_diff($all, $enabled, $disabled); 50 $this->print_extension_list($output, $this->user->lang('CLI_EXTENSIONS_AVAILABLE') . $this->user->lang('COLON'), $purged); 51 } 52 53 protected function print_extension_list(OutputInterface $output, $type, array $extensions) 54 { 55 $output->writeln("<info>$type</info>"); 56 57 foreach ($extensions as $extension) 58 { 59 $output->writeln(" - $extension"); 60 } 61 } 62 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Thu Jan 11 00:25:41 2018 | Cross-referenced by PHPXref 0.7.1 |