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. |
|
(Beispiel Datei-Icons)
|
Auf das Icon klicken um den Quellcode anzuzeigen |
enable.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\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 enable extends command
21 {
22 protected function configure()
23 {
24 $this
25 ->setName('extension:enable')
26 ->setDescription($this->user->lang('CLI_DESCRIPTION_ENABLE_EXTENSION'))
27 ->addArgument(
28 'extension-name',
29 InputArgument::REQUIRED,
30 $this->user->lang('CLI_EXTENSION_NAME')
31 )
32 ;
33 }
34
35 protected function execute(InputInterface $input, OutputInterface $output)
36 {
37 $io = new SymfonyStyle($input, $output);
38
39 $name = $input->getArgument('extension-name');
40 $this->manager->enable($name);
41 $this->manager->load_extensions();
42
43 if ($this->manager->is_enabled($name))
44 {
45 $this->log->add('admin', ANONYMOUS, '', 'LOG_EXT_ENABLE', time(), array($name));
46 $io->success($this->user->lang('CLI_EXTENSION_ENABLE_SUCCESS', $name));
47 return 0;
48 }
49 else
50 {
51 $io->error($this->user->lang('CLI_EXTENSION_ENABLE_FAILURE', $name));
52 return 1;
53 }
54 }
55 }
56