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 |
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
19 class enable extends command
20 {
21 protected function configure()
22 {
23 $this
24 ->setName('extension:enable')
25 ->setDescription($this->user->lang('CLI_DESCRIPTION_ENABLE_EXTENSION'))
26 ->addArgument(
27 'extension-name',
28 InputArgument::REQUIRED,
29 $this->user->lang('CLI_EXTENSION_NAME')
30 )
31 ;
32 }
33
34 protected function execute(InputInterface $input, OutputInterface $output)
35 {
36 $name = $input->getArgument('extension-name');
37 $this->manager->enable($name);
38 $this->manager->load_extensions();
39
40 if ($this->manager->is_enabled($name))
41 {
42 $this->log->add('admin', ANONYMOUS, '', 'LOG_EXT_ENABLE', time(), array($name));
43 $output->writeln('<info>' . $this->user->lang('CLI_EXTENSION_ENABLE_SUCCESS', $name) . '</info>');
44 return 0;
45 }
46 else
47 {
48 $output->writeln('<error>' . $this->user->lang('CLI_EXTENSION_ENABLE_FAILURE', $name) . '</error>');
49 return 1;
50 }
51 }
52 }
53