|
@@ -0,0 +1,21 @@
|
|
|
|
+<?php
|
|
|
|
+
|
|
|
|
+namespace App\Twig;
|
|
|
|
+
|
|
|
|
+use App\Repository\TagRepository;
|
|
|
|
+use Twig\Extension\RuntimeExtensionInterface;
|
|
|
|
+
|
|
|
|
+class ListeTagsRuntimeExtension implements RuntimeExtensionInterface
|
|
|
|
+{
|
|
|
|
+ public function __construct(
|
|
|
|
+ protected readonly TagRepository $tagRepository
|
|
|
|
+ )
|
|
|
|
+ {
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public function getListeTags(): array
|
|
|
|
+ {
|
|
|
|
+ return $this->tagRepository->findAll();
|
|
|
|
+ }
|
|
|
|
+}
|