| Total Complexity | 3 |
| Total Lines | 28 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 7 | class ThemeExtension extends \Twig_Extension |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * @var string |
||
| 11 | */ |
||
| 12 | private $themeUrl; |
||
| 13 | |||
| 14 | public function __construct(string $themeUrl) |
||
| 15 | { |
||
| 16 | |||
| 17 | $this->themeUrl = rtrim($themeUrl, '/').'/'; |
||
| 18 | } |
||
| 19 | |||
| 20 | /** |
||
| 21 | * Returns a list of functions to add to the existing list. |
||
| 22 | * |
||
| 23 | * @return \Twig_Function[] |
||
| 24 | */ |
||
| 25 | public function getFunctions() |
||
| 29 | ]; |
||
| 30 | } |
||
| 31 | |||
| 32 | public function getThemeUrl(string $resource): string |
||
| 35 | } |
||
| 36 | } |