@@ 62-72 (lines=11) @@ | ||
59 | $this->twig->addFunction($filter); |
|
60 | } |
|
61 | ||
62 | protected function extendForQueryParams() : void |
|
63 | { |
|
64 | $filter = new \Twig_SimpleFunction( |
|
65 | 'queryParams', |
|
66 | function ($queryParams, $prefix = '?') { |
|
67 | return $prefix . http_build_query($queryParams); |
|
68 | }, |
|
69 | array('is_safe' => array('html')) |
|
70 | ); |
|
71 | $this->twig->addFunction($filter); |
|
72 | } |
|
73 | ||
74 | protected function extendForSiteUrl() : void |
|
75 | { |
|
@@ 74-84 (lines=11) @@ | ||
71 | $this->twig->addFunction($filter); |
|
72 | } |
|
73 | ||
74 | protected function extendForSiteUrl() : void |
|
75 | { |
|
76 | $filter = new \Twig_SimpleFunction( |
|
77 | 'siteUrl', |
|
78 | function ($path = '') { |
|
79 | return $this->config['base_url'] . $path; |
|
80 | }, |
|
81 | array('is_safe' => array('html')) |
|
82 | ); |
|
83 | $this->twig->addFunction($filter); |
|
84 | } |
|
85 | ||
86 | protected function extendForVarDump() : void |
|
87 | { |