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. |
|
(Beispiel Datei-Icons)
|
Auf das Icon klicken um den Quellcode anzuzeigen |
FormThemeNode.php
01 <?php
02
03 /*
04 * This file is part of the Symfony package.
05 *
06 * (c) Fabien Potencier <fabien@symfony.com>
07 *
08 * For the full copyright and license information, please view the LICENSE
09 * file that was distributed with this source code.
10 */
11
12 namespace Symfony\Bridge\Twig\Node;
13
14 use Symfony\Bridge\Twig\Form\TwigRenderer;
15 use Symfony\Component\Form\FormRenderer;
16 use Twig\Compiler;
17 use Twig\Error\RuntimeError;
18 use Twig\Node\Node;
19
20 /**
21 * @author Fabien Potencier <fabien@symfony.com>
22 */
23 class FormThemeNode extends Node
24 {
25 public function __construct(Node $form, Node $resources, $lineno, $tag = null, $only = false)
26 {
27 parent::__construct(['form' => $form, 'resources' => $resources], ['only' => (bool) $only], $lineno, $tag);
28 }
29
30 public function compile(Compiler $compiler)
31 {
32 try {
33 $compiler->getEnvironment()->getRuntime(FormRenderer::class);
34 $renderer = FormRenderer::class;
35 } catch (RuntimeError $e) {
36 $renderer = TwigRenderer::class;
37 }
38
39 $compiler
40 ->addDebugInfo($this)
41 ->write('$this->env->getRuntime(')
42 ->string($renderer)
43 ->raw(')->setTheme(')
44 ->subcompile($this->getNode('form'))
45 ->raw(', ')
46 ->subcompile($this->getNode('resources'))
47 ->raw(', ')
48 ->raw(false === $this->getAttribute('only') ? 'true' : 'false')
49 ->raw(");\n");
50 }
51 }
52