<?php
namespace App\Controller\Frontend;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Doctrine\ORM\EntityManagerInterface;
use App\Service\TextHelper;
use App\Entity\Section;
class StagefrontController extends AbstractController
{
public function __construct()
{
// echo 'We can use __contruct<br />';
}
/**
* @Route(
* {
* "es" : "{_locale}/rcdestadium",
* "ca" : "{_locale}/rcdestadium",
* "en" : "{_locale}/rcdestadium",
* }, name="rcdestadium",
* requirements={
* "_locale": "es|ca|en",
* "_format" : "html"
* }
* )
*/
public function index(Request $request, TextHelper $textHelper)
{
$oneSection = $this->getDoctrine()->getRepository(Section::Class)->findOneBy(['code' => 'rcdestadium']);
$text = ($textHelper->getBySection($oneSection)) ? $textHelper->getBySection($oneSection) : [];
return $this->render('Frontend/stagefrontstadium/stagefrontstadium.html.twig', ['text' => $text, 'oneSection' => $oneSection]);
}
// /**
// * @Route(
// * {
// * "es" : "{_locale}/stagefront",
// * "ca" : "{_locale}/stagefront",
// * "en" : "{_locale}/stagefront",
// * }, name="stagefront",
// * requirements={
// * "_locale": "es|ca|en",
// * "_format" : "html"
// * }
// * )
// */
// public function stagefront(Request $request, TextHelper $textHelper) {
// $oneSection = $this->getDoctrine()->getRepository(Section::Class)->findOneBy(['code' => 'stagefront']);
// $text = ($textHelper->getBySection($oneSection)) ? $textHelper->getBySection($oneSection) : [];
// return $this->render('Frontend/stagefrontstadium/stagefront.html.twig', ['text' => $text, 'oneSection' => $oneSection]);
// }
// /**
// * @Route(
// * {
// * "es" : "{_locale}/backtothefront",
// * "ca" : "{_locale}/backtothefront",
// * "en" : "{_locale}/backtothefront",
// * }, name="backtothefront",
// * requirements={
// * "_locale": "es|ca|en",
// * "_format" : "html"
// * }
// * )
// */
// public function backtothefront(Request $request, TextHelper $textHelper)
// {
// $oneSection = $this->getDoctrine()->getRepository(Section::Class)->findOneBy(['code' => 'backtothefront']);
// $text = ($textHelper->getBySection($oneSection)) ? $textHelper->getBySection($oneSection) : [];
// return $this->render('Frontend/stagefrontstadium/backtothefront.html.twig', ['text' => $text, 'oneSection' => $oneSection]);
// }
}