Verzeichnisstruktur phpBB-3.2.0


Veröffentlicht
06.01.2017

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.
Auf den Verzeichnisnamen klicken, dies zeigt nur das Verzeichnis mit Inhalt an

(Beispiel Datei-Icons)

Auf das Icon klicken um den Quellcode anzuzeigen

list_command.php

Zuletzt modifiziert: 09.10.2024, 12:55 - Dateigröße: 1.71 KiB


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\db;
14   
15  use Symfony\Component\Console\Input\InputInterface;
16  use Symfony\Component\Console\Input\InputOption;
17  use Symfony\Component\Console\Output\OutputInterface;
18  use Symfony\Component\Console\Style\SymfonyStyle;
19   
20  class list_command extends \phpbb\console\command\db\migration_command
21  {
22      protected function configure()
23      {
24          $this
25              ->setName('db:list')
26              ->setDescription($this->user->lang('CLI_DESCRIPTION_DB_LIST'))
27              ->addOption(
28                  'available',
29                  'u',
30                  InputOption::VALUE_NONE,
31                  $this->user->lang('CLI_MIGRATIONS_ONLY_AVAILABLE')
32              )
33          ;
34      }
35   
36      protected function execute(InputInterface $input, OutputInterface $output)
37      {
38          $io = new SymfonyStyle($input, $output);
39   
40          $show_installed = !$input->getOption('available');
41          $installed = $available = array();
42   
43          foreach ($this->load_migrations() as $name)
44          {
45              if ($this->migrator->migration_state($name) !== false)
46              {
47                  $installed[] = $name;
48              }
49              else
50              {
51                  $available[] = $name;
52              }
53          }
54   
55          if ($show_installed)
56          {
57              $io->section($this->user->lang('CLI_MIGRATIONS_INSTALLED'));
58   
59              if (!empty($installed))
60              {
61                  $io->listing($installed);
62              }
63              else
64              {
65                  $io->text($this->user->lang('CLI_MIGRATIONS_EMPTY'));
66                  $io->newLine();
67              }
68          }
69   
70          $io->section($this->user->lang('CLI_MIGRATIONS_AVAILABLE'));
71          if (!empty($available))
72          {
73              $io->listing($available);
74          }
75          else
76          {
77              $io->text($this->user->lang('CLI_MIGRATIONS_EMPTY'));
78              $io->newLine();
79          }
80      }
81  }
82