mirror of
https://forge.chapril.org/tykayn/osm-commerces
synced 2025-10-04 17:04:53 +02:00
up wiki controller
This commit is contained in:
parent
2f49ef6479
commit
391a212034
13 changed files with 1271297 additions and 866 deletions
28
src/Twig/AppExtension.php
Normal file
28
src/Twig/AppExtension.php
Normal 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);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue