Verzeichnisstruktur phpBB-3.3.15


Veröffentlicht
28.08.2024

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

delete.php

Zuletzt modifiziert: 02.04.2025, 15:02 - Dateigröße: 1.47 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\config;
14   
15  use Symfony\Component\Console\Input\InputArgument;
16  use Symfony\Component\Console\Input\InputInterface;
17  use Symfony\Component\Console\Output\OutputInterface;
18  use Symfony\Component\Console\Style\SymfonyStyle;
19   
20  class delete extends command
21  {
22      /**
23      * {@inheritdoc}
24      */
25      protected function configure()
26      {
27          $this
28              ->setName('config:delete')
29              ->setDescription($this->user->lang('CLI_DESCRIPTION_DELETE_CONFIG'))
30              ->addArgument(
31                  'key',
32                  InputArgument::REQUIRED,
33                  $this->user->lang('CLI_CONFIG_OPTION_NAME')
34              )
35          ;
36      }
37   
38      /**
39      * Executes the command config:delete.
40      *
41      * Removes a configuration option
42      *
43      * @param InputInterface  $input  An InputInterface instance
44      * @param OutputInterface $output An OutputInterface instance
45      *
46      * @return void
47      * @see \phpbb\config\config::delete()
48      */
49      protected function execute(InputInterface $input, OutputInterface $output)
50      {
51          $io = new SymfonyStyle($input, $output);
52   
53          $key = $input->getArgument('key');
54   
55          if (isset($this->config[$key]))
56          {
57              $this->config->delete($key);
58   
59              $io->success($this->user->lang('CLI_CONFIG_DELETE_SUCCESS', $key));
60          }
61          else
62          {
63              $io->error($this->user->lang('CLI_CONFIG_NOT_EXISTS', $key));
64          }
65      }
66  }
67