Generate grid

This commit is contained in:
thibaud-leclere
2026-01-31 16:17:24 +01:00
parent 1ebf8b99b3
commit a196fac6c6
10 changed files with 158 additions and 40 deletions

21
src/Twig/AppExtension.php Normal file
View File

@@ -0,0 +1,21 @@
<?php
namespace App\Twig;
use Twig\Extension\AbstractExtension;
use Twig\TwigFilter;
class AppExtension extends AbstractExtension
{
public function getFilters(): array
{
return [
new TwigFilter('match', [$this, 'match']),
];
}
public function match(string $string, string $pattern): bool
{
return preg_match($pattern, $string);
}
}