[ 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 phpBB Forum Software package. 5 * 6 * @copyright (c) phpBB Limited <https://www.phpbb.com> 7 * @license GNU General Public License, version 2 (GPL-2.0) 8 * 9 * For full copyright and license information, please see 10 * the docs/CREDITS.txt file. 11 * 12 */ 13 14 namespace phpbb\template\twig\extension; 15 16 use Symfony\Bridge\Twig\Extension\RoutingExtension; 17 use Symfony\Component\Routing\Generator\UrlGeneratorInterface; 18 19 class routing extends RoutingExtension 20 { 21 /** @var \phpbb\controller\helper */ 22 protected $helper; 23 24 /** 25 * Constructor 26 * 27 * @param \phpbb\routing\helper $helper 28 */ 29 public function __construct(\phpbb\routing\helper $helper) 30 { 31 $this->helper = $helper; 32 } 33 34 public function getPath($name, $parameters = array(), $relative = false) 35 { 36 return $this->helper->route($name, $parameters, true, false, $relative ? UrlGeneratorInterface::RELATIVE_PATH : UrlGeneratorInterface::ABSOLUTE_PATH); 37 } 38 39 public function getUrl($name, $parameters = array(), $schemeRelative = false) 40 { 41 return $this->helper->route($name, $parameters, true, false, $schemeRelative ? UrlGeneratorInterface::NETWORK_PATH : UrlGeneratorInterface::ABSOLUTE_URL); 42 } 43 }
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 |