mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-28 04:58:46 +02:00
Merge remote-tracking branch 'origin/support/3.0' into develop
# Conflicts: # datamodels/2.x/itop-portal-base/portal/src/Twig/AppExtension.php
This commit is contained in:
@@ -145,6 +145,14 @@ class Extension
|
||||
// @see https://www.php.net/manual/fr/function.var-export.php
|
||||
$aFilters[] = new Twig_SimpleFilter('var_export', 'var_export');
|
||||
|
||||
$aFilters[] = new Twig_SimpleFilter('filter', function ($array, $arrow) {
|
||||
if ($arrow == 'system') {
|
||||
return json_encode($array);
|
||||
}
|
||||
|
||||
return twig_array_filter($array, $arrow);
|
||||
});
|
||||
|
||||
return $aFilters;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user