up wiki controller

This commit is contained in:
Tykayn 2025-08-22 17:58:13 +02:00 committed by tykayn
parent 2f49ef6479
commit 391a212034
13 changed files with 1271297 additions and 866 deletions

28
src/Twig/AppExtension.php Normal file
View file

@ -0,0 +1,28 @@
<?php
namespace App\Twig;
use Twig\Extension\AbstractExtension;
use Twig\TwigFilter;
class AppExtension extends AbstractExtension
{
public function getFilters()
{
return [
new TwigFilter('repeat', [$this, 'repeatFilter']),
];
}
/**
* Repeats a string a specified number of times
*
* @param string $string The string to repeat
* @param int $times The number of times to repeat the string
* @return string The repeated string
*/
public function repeatFilter($string, $times)
{
return str_repeat($string, $times);
}
}