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.
Auf den Verzeichnisnamen klicken, dies zeigt nur das Verzeichnis mit Inhalt an

(Beispiel Datei-Icons)

Auf das Icon klicken um den Quellcode anzuzeigen

RenderBlockNode.php

Zuletzt modifiziert: 09.10.2024, 12:56 - Dateigröße: 1.20 KiB


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  /**
15   * Compiles a call to {@link \Symfony\Component\Form\FormRendererInterface::renderBlock()}.
16   *
17   * The function name is used as block name. For example, if the function name
18   * is "foo", the block "foo" will be rendered.
19   *
20   * @author Bernhard Schussek <bschussek@gmail.com>
21   */
22  class RenderBlockNode extends \Twig_Node_Expression_Function
23  {
24      public function compile(\Twig_Compiler $compiler)
25      {
26          $compiler->addDebugInfo($this);
27          $arguments = iterator_to_array($this->getNode('arguments'));
28          $compiler->write('$this->env->getExtension(\'form\')->renderer->renderBlock(');
29   
30          if (isset($arguments[0])) {
31              $compiler->subcompile($arguments[0]);
32              $compiler->raw(', \''.$this->getAttribute('name').'\'');
33   
34              if (isset($arguments[1])) {
35                  $compiler->raw(', ');
36                  $compiler->subcompile($arguments[1]);
37              }
38          }
39   
40          $compiler->raw(')');
41      }
42  }
43