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 |
recreate.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\thumbnail;
14
15 use Symfony\Component\Console\Input\InputInterface;
16 use Symfony\Component\Console\Input\ArrayInput;
17 use Symfony\Component\Console\Output\OutputInterface;
18
19 class recreate extends \phpbb\console\command\command
20 {
21 /**
22 * Sets the command name and description
23 *
24 * @return null
25 */
26 protected function configure()
27 {
28 $this
29 ->setName('thumbnail:recreate')
30 ->setDescription($this->user->lang('CLI_DESCRIPTION_THUMBNAIL_RECREATE'))
31 ;
32 }
33
34 /**
35 * Executes the command thumbnail:recreate.
36 *
37 * This command is a "macro" to execute thumbnail:delete and then thumbnail:generate.
38 *
39 * @param InputInterface $input The input stream used to get the argument and verboe option.
40 * @param OutputInterface $output The output stream, used for printing verbose-mode and error information.
41 *
42 * @return int 0 if all is ok, 1 if a thumbnail couldn't be deleted.
43 */
44 protected function execute(InputInterface $input, OutputInterface $output)
45 {
46 $parameters = array(
47 'command' => 'thumbnail:delete'
48 );
49
50 if ($input->getOption('verbose'))
51 {
52 $parameters['-' . str_repeat('v', $output->getVerbosity() - 1)] = true;
53 }
54
55 $this->getApplication()->setAutoExit(false);
56
57 $input_delete = new ArrayInput($parameters);
58 $return = $this->getApplication()->run($input_delete, $output);
59
60 if ($return === 0)
61 {
62 $parameters['command'] = 'thumbnail:generate';
63
64 $input_create = new ArrayInput($parameters);
65 $return = $this->getApplication()->run($input_create, $output);
66 }
67
68 $this->getApplication()->setAutoExit(true);
69
70 return $return;
71 }
72 }
73