| @@ 125-135 (lines=11) @@ | ||
| 122 | $this->twig->addFunction($filter); |
|
| 123 | } |
|
| 124 | ||
| 125 | protected function extendForQueryParams() : void |
|
| 126 | { |
|
| 127 | $filter = new \Twig_SimpleFunction( |
|
| 128 | 'queryParams', |
|
| 129 | function ($queryParams, $prefix = '?') { |
|
| 130 | return $prefix . http_build_query($queryParams); |
|
| 131 | }, |
|
| 132 | array('is_safe' => array('html')) |
|
| 133 | ); |
|
| 134 | $this->twig->addFunction($filter); |
|
| 135 | } |
|
| 136 | ||
| 137 | protected function extendForSiteUrl() : void |
|
| 138 | { |
|
| @@ 137-147 (lines=11) @@ | ||
| 134 | $this->twig->addFunction($filter); |
|
| 135 | } |
|
| 136 | ||
| 137 | protected function extendForSiteUrl() : void |
|
| 138 | { |
|
| 139 | $filter = new \Twig_SimpleFunction( |
|
| 140 | 'siteUrl', |
|
| 141 | function ($path = '') { |
|
| 142 | return $this->config['base_url'] . $path; |
|
| 143 | }, |
|
| 144 | array('is_safe' => array('html')) |
|
| 145 | ); |
|
| 146 | $this->twig->addFunction($filter); |
|
| 147 | } |
|
| 148 | ||
| 149 | protected function extendForVarDump() : void |
|
| 150 | { |
|