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