src/Action/ReferenceAction.php line 30

Open in your IDE?
  1. <?php
  2. declare(strict_types 1);
  3. namespace App\Action;
  4. use App\Infra\Services\FilterApiService;
  5. use App\Responder\RedirectResponder;
  6. use App\Responder\TemplateResponder;
  7. use Symfony\Component\Routing\Annotation\Route;
  8. class ReferenceAction extends AbstractAction
  9. {
  10.     public function __construct(
  11.         TemplateResponder $templateResponder,
  12.         RedirectResponder $redirectResponder,
  13.         FilterApiService $filterApiService
  14.     )
  15.     {
  16.         $this->templateResponder $templateResponder;
  17.         $this->redirectResponder $redirectResponder;
  18.         $this->filterApiService $filterApiService;
  19.     }
  20.     /**
  21.      * @Route("/references", name="reference")
  22.      */
  23.     public function __invoke()
  24.     {
  25.         $references $this->filterApiService->getReferences();
  26.         return $this->templateResponder->__invoke('reference.html.twig', [
  27.             'references' => $references
  28.         ]);
  29.     }
  30. }