Expose parse_url via parseurl() Twig function

This commit is contained in:
Andy Miller
2022-03-20 19:02:36 -06:00
parent ae55b4794f
commit 57d6be0f78
2 changed files with 2 additions and 0 deletions

View File

@@ -3,6 +3,7 @@
1. [](#new)
* Added `|replace_last(search, replace)` filter
* Added `urlparse` Twig function to expose PHP's `url_parse` function
2. [](#improved)
* Added multi-language support for page routes in `Utils::url()`
* Set default maximum length for text fields

View File

@@ -195,6 +195,7 @@ class GravExtension extends AbstractExtension implements GlobalsInterface
new TwigFunction('gist', [$this, 'gistFunc']),
new TwigFunction('nonce_field', [$this, 'nonceFieldFunc']),
new TwigFunction('pathinfo', 'pathinfo'),
new TwigFunction('parseurl', 'parse_url'),
new TwigFunction('random_string', [$this, 'randomStringFunc']),
new TwigFunction('repeat', [$this, 'repeatFunc']),
new TwigFunction('regex_replace', [$this, 'regexReplace']),