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 |
HttpKernelExtension.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\Extension;
13
14 use Symfony\Component\HttpKernel\Controller\ControllerReference;
15 use Twig\Extension\AbstractExtension;
16 use Twig\TwigFunction;
17
18 /**
19 * Provides integration with the HttpKernel component.
20 *
21 * @author Fabien Potencier <fabien@symfony.com>
22 */
23 class HttpKernelExtension extends AbstractExtension
24 {
25 public function getFunctions()
26 {
27 return [
28 new TwigFunction('render', [HttpKernelRuntime::class, 'renderFragment'], ['is_safe' => ['html']]),
29 new TwigFunction('render_*', [HttpKernelRuntime::class, 'renderFragmentStrategy'], ['is_safe' => ['html']]),
30 new TwigFunction('controller', static::class.'::controller'),
31 ];
32 }
33
34 public static function controller($controller, $attributes = [], $query = [])
35 {
36 return new ControllerReference($controller, $attributes, $query);
37 }
38
39 /**
40 * {@inheritdoc}
41 */
42 public function getName()
43 {
44 return 'http_kernel';
45 }
46 }
47