src/Bundle/Croatia/Controller/V1/InformationController.php line 14

Open in your IDE?
  1. <?php declare(strict_types=1);
  2. namespace App\Bundle\Croatia\Controller\V1;
  3. use FOS\RestBundle\Controller\Annotations as Rest;
  4. use Swagger\Annotations as SWG;
  5. use App\Controller\V1\InformationController as BaseController;
  6. use Symfony\Component\Routing\Annotation\Route;
  7. /**
  8.  * @Route("/information")
  9.  * @SWG\Tag(name="Helper_v1")
  10.  */
  11. class InformationController extends BaseController
  12. {
  13.     /**
  14.      * @Route("/legal-info", methods={"GET"})
  15.      * @Rest\View()
  16.      *
  17.      * @SWG\Response(
  18.      *     response="200",
  19.      *     description="Success",
  20.      *     @SWG\Schema(type="array", @SWG\Items(@SWG\Property(property="docType", type="string"),
  21.      *      @SWG\Property(property="label", type="string"),
  22.      *      @SWG\Property(property="doc", type="string")
  23.      *     ))))
  24.      *
  25.      * @return array
  26.      */
  27.     public function legalInfoAction()
  28.     {
  29.         return [
  30.             [
  31.                 'docType' => $this->translator->trans('information.legal-info.hr.1.docType'),
  32.                 'label' => $this->translator->trans('information.legal-info.hr.1.label'),
  33.                 'doc' => $this->translator->trans('information.legal-info.hr.1.doc'),
  34.             ],
  35.             [
  36.                 'docType' => $this->translator->trans('information.legal-info.hr.2.docType'),
  37.                 'label' => $this->translator->trans('information.legal-info.hr.2.label'),
  38.                 'doc' => $this->translator->trans('information.legal-info.hr.2.doc'),
  39.             ],
  40.             [
  41.                 'docType' => $this->translator->trans('information.legal-info.hr.3.docType'),
  42.                 'label' => $this->translator->trans('information.legal-info.hr.3.label'),
  43.                 'doc' => $this->translator->trans('information.legal-info.hr.3.doc'),
  44.             ],
  45.             [
  46.                 'docType' => $this->translator->trans('information.legal-info.hr.4.docType'),
  47.                 'label' => $this->translator->trans('information.legal-info.hr.4.label'),
  48.                 'doc' => $this->translator->trans('information.legal-info.hr.4.doc'),
  49.             ],
  50.             [
  51.                 'docType' => $this->translator->trans('information.legal-info.hr.5.docType'),
  52.                 'label' => $this->translator->trans('information.legal-info.hr.5.label'),
  53.                 'doc' => $this->translator->trans('information.legal-info.hr.5.doc'),
  54.             ],
  55.             [
  56.                 'docType' => $this->translator->trans('information.legal-info.hr.6.docType'),
  57.                 'label' => $this->translator->trans('information.legal-info.hr.6.label'),
  58.                 'doc' => $this->translator->trans('information.legal-info.hr.6.doc'),
  59.             ],
  60.             [
  61.                 'docType' => $this->translator->trans('information.legal-info.hr.7.docType'),
  62.                 'label' => $this->translator->trans('information.legal-info.hr.7.label'),
  63.                 'doc' => $this->translator->trans('information.legal-info.hr.7.doc'),
  64.             ],
  65.             [
  66.                 'docType' => $this->translator->trans('information.legal-info.hr.8.docType'),
  67.                 'label' => $this->translator->trans('information.legal-info.hr.8.label'),
  68.                 'doc' => $this->translator->trans('information.legal-info.hr.8.doc'),
  69.             ]
  70.         ];
  71.     }
  72.     /**
  73.      * @Route("/cookie-policy", methods={"GET"})
  74.      * @Rest\View()
  75.      *
  76.      * @SWG\Response(
  77.      *     response="200",
  78.      *     description="Success",
  79.      *     @SWG\Schema(type="object",@SWG\Property(property="path", type="string")
  80.      *     ))
  81.      *
  82.      * @return array
  83.      */
  84.     public function cookiePolicyAction()
  85.     {
  86.         return [
  87.             'path' => '/static/media/' $this->translator->trans('information.legal-info.hr.4.doc')
  88.         ];
  89.     }
  90. }