[ Index ] |
PHP Cross Reference of phpBB-3.3.14-deutsch |
[Summary view] [Print] [Text view]
1 <?php 2 3 /* 4 * This file is part of the Symfony package. 5 * 6 * (c) Fabien Potencier <fabien@symfony.com> 7 * 8 * For the full copyright and license information, please view the LICENSE 9 * 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 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Mon Nov 25 19:05:08 2024 | Cross-referenced by PHPXref 0.7.1 |