recup sources

This commit is contained in:
Tykayn 2025-09-01 18:28:23 +02:00 committed by tykayn
parent 86622a19ea
commit 65fe2a35f9
155 changed files with 50969 additions and 0 deletions

0
src/Controller/.gitignore vendored Normal file
View file

File diff suppressed because it is too large Load diff

0
src/Entity/.gitignore vendored Normal file
View file

11
src/Kernel.php Normal file
View file

@ -0,0 +1,11 @@
<?php
namespace App;
use Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait;
use Symfony\Component\HttpKernel\Kernel as BaseKernel;
class Kernel extends BaseKernel
{
use MicroKernelTrait;
}

0
src/Repository/.gitignore vendored Normal file
View file

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);
}
}

View file

@ -0,0 +1,22 @@
<?php
namespace App\Twig;
use Twig\Extension\AbstractExtension;
use Twig\TwigFunction;
use App\Controller\AdminController;
class TagEmojiExtension extends AbstractExtension
{
public function getFunctions(): array
{
return [
new TwigFunction('tag_emoji', [self::class, 'getTagEmoji']),
];
}
public static function getTagEmoji(?string $mainTag): string
{
return AdminController::getTagEmoji($mainTag);
}
}