Added array_diff() twig function

This commit is contained in:
Matias Griese
2019-10-11 13:39:59 +03:00
parent 8599faaf3b
commit 411656a9d6
2 changed files with 2 additions and 0 deletions

View File

@@ -4,6 +4,7 @@
1. [](#new)
* Added `Flex Pages` to Grav core and removed Flex Objects plugin dependency
* Added `Utils::simpleTemplate()` method for very simple variable templating
* Added `array_diff()` twig function
1. [](#improved)
* Improved `Flex Users`: obey blueprints and allow Flex to be used in admin only
* Improved `Flex` to support custom site template paths

View File

@@ -150,6 +150,7 @@ class TwigExtension extends AbstractExtension implements GlobalsInterface
new TwigFunction('array_key_exists', 'array_key_exists'),
new TwigFunction('array_unique', 'array_unique'),
new TwigFunction('array_intersect', [$this, 'arrayIntersectFunc']),
new TwigFunction('array_diff', 'array_diff'),
new TwigFunction('authorize', [$this, 'authorize']),
new TwigFunction('debug', [$this, 'dump'], ['needs_context' => true, 'needs_environment' => true]),
new TwigFunction('dump', [$this, 'dump'], ['needs_context' => true, 'needs_environment' => true]),