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. |
|
(Beispiel Datei-Icons)
|
Auf das Icon klicken um den Quellcode anzuzeigen |
routing.php
01 <?php
02 /**
03 *
04 * This file is part of the phpBB Forum Software package.
05 *
06 * @copyright (c) phpBB Limited <https://www.phpbb.com>
07 * @license GNU General Public License, version 2 (GPL-2.0)
08 *
09 * 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 }
44