Verzeichnisstruktur phpBB-3.1.0
- Veröffentlicht
- 27.10.2014
So funktioniert es
|
Auf das letzte Element klicken. Dies geht jeweils ein Schritt zurück |
Auf das Icon klicken, dies öffnet das Verzeichnis. Nochmal klicken schließt das Verzeichnis. |
|
(Beispiel Datei-Icons)
|
Auf das Icon klicken um den Quellcode anzuzeigen |
show.php
01 <?php
02 /**
03 *
04 * This file is part of the phpBB Forum Software package.
05 *
06 * @copyright (c) phpBB Limited <https://www.phpbb.com>
07 * @license GNU General Public License, version 2 (GPL-2.0)
08 *
09 * 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 }
63