src/Controller/Frontend/StagefrontController.php line 35

Open in your IDE?
  1. <?php
  2. namespace App\Controller\Frontend;
  3. use Symfony\Component\HttpFoundation\Response;
  4. use Symfony\Component\HttpFoundation\Request;
  5. use Symfony\Component\Routing\Annotation\Route;
  6. use Symfony\Bundle\FrameworkBundle\Controller\Controller;
  7. use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
  8. use Doctrine\ORM\EntityManagerInterface;
  9. use App\Service\TextHelper;
  10. use App\Entity\Section;
  11. class StagefrontController extends AbstractController
  12. {
  13.     public function __construct()
  14.     {
  15.         // echo 'We can use __contruct<br />';
  16.     }
  17.     /**
  18.      * @Route(
  19.      *   {
  20.      *       "es" : "{_locale}/rcdestadium",
  21.      *       "ca" : "{_locale}/rcdestadium",
  22.      *       "en" : "{_locale}/rcdestadium",
  23.      *    }, name="rcdestadium",
  24.      *       requirements={
  25.      *          "_locale": "es|ca|en",
  26.      *          "_format" : "html"
  27.      *      }
  28.      * )
  29.      */
  30.     public function index(Request $requestTextHelper $textHelper)
  31.     {
  32.         $oneSection $this->getDoctrine()->getRepository(Section::Class)->findOneBy(['code' => 'rcdestadium']);
  33.         $text = ($textHelper->getBySection($oneSection)) ? $textHelper->getBySection($oneSection) : [];
  34.         return $this->render('Frontend/stagefrontstadium/stagefrontstadium.html.twig', ['text' => $text'oneSection' => $oneSection]);
  35.     }
  36.     // /**
  37.     //  * @Route(
  38.     //  *   {
  39.     //  *       "es" : "{_locale}/stagefront",
  40.     //  *       "ca" : "{_locale}/stagefront",
  41.     //  *       "en" : "{_locale}/stagefront",
  42.     //  *    }, name="stagefront",
  43.     //  *       requirements={
  44.     //  *          "_locale": "es|ca|en",
  45.     //  *          "_format" : "html"
  46.     //  *      }
  47.     //  * )
  48.     //  */
  49.     // public function stagefront(Request $request, TextHelper $textHelper) {
  50.     //     $oneSection = $this->getDoctrine()->getRepository(Section::Class)->findOneBy(['code' => 'stagefront']);
  51.     //     $text = ($textHelper->getBySection($oneSection)) ? $textHelper->getBySection($oneSection) : [];
  52.     //     return $this->render('Frontend/stagefrontstadium/stagefront.html.twig', ['text' => $text, 'oneSection' => $oneSection]);
  53.     // }
  54.     // /**
  55.     //  * @Route(
  56.     //  *   {
  57.     //  *       "es" : "{_locale}/backtothefront",
  58.     //  *       "ca" : "{_locale}/backtothefront",
  59.     //  *       "en" : "{_locale}/backtothefront",
  60.     //  *    }, name="backtothefront",
  61.     //  *       requirements={
  62.     //  *          "_locale": "es|ca|en",
  63.     //  *          "_format" : "html"
  64.     //  *      }
  65.     //  * )
  66.     //  */
  67.     // public function backtothefront(Request $request, TextHelper $textHelper)
  68.     // {
  69.     //     $oneSection = $this->getDoctrine()->getRepository(Section::Class)->findOneBy(['code' => 'backtothefront']);
  70.     //     $text = ($textHelper->getBySection($oneSection)) ? $textHelper->getBySection($oneSection) : [];
  71.     //     return $this->render('Frontend/stagefrontstadium/backtothefront.html.twig', ['text' => $text, 'oneSection' => $oneSection]);
  72.     // }
  73. }