Upload files to "/"

This commit is contained in:
2023-12-20 21:51:08 +00:00
parent b368630a55
commit 2da6ecd558
5 changed files with 417 additions and 0 deletions

21
custom-twig-extension.php Normal file
View File

@@ -0,0 +1,21 @@
<?php
class CustomTwigExtension extends \Twig\Extension\AbstractExtension implements \Twig\Extension\GlobalsInterface
{
public function getFilters()
{
return [
new \Twig\TwigFilter('json_decode', [$this, 'jsonDecode']),
];
}
public function getGlobals(): array
{
return [];
}
public function jsonDecode($json)
{
return json_decode($json, true);
}
}