recup sources
This commit is contained in:
parent
86622a19ea
commit
65fe2a35f9
155 changed files with 50969 additions and 0 deletions
0
src/Controller/.gitignore
vendored
Normal file
0
src/Controller/.gitignore
vendored
Normal file
1439
src/Controller/WikiController.php
Normal file
1439
src/Controller/WikiController.php
Normal file
File diff suppressed because it is too large
Load diff
0
src/Entity/.gitignore
vendored
Normal file
0
src/Entity/.gitignore
vendored
Normal file
11
src/Kernel.php
Normal file
11
src/Kernel.php
Normal 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
0
src/Repository/.gitignore
vendored
Normal file
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);
|
||||
}
|
||||
}
|
22
src/Twig/TagEmojiExtension.php
Normal file
22
src/Twig/TagEmojiExtension.php
Normal 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);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue