<?php
namespace App\Controller\Frontend;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use App\Service\TextHelper;
use App\Entity\Section;
class FooterController extends AbstractController
{
/**
* Matches / es exactly
*
* @Route("{_locale}/social", name="social")
*/
public function index(TextHelper $textHelper)
{
//sdfdsfssaaaaa
$oneSection = $this->getDoctrine()->getRepository(Section::Class)->findOneBy(['code' => 'footer']);
$text = ($textHelper->getBySection($oneSection)) ? $textHelper->getBySection($oneSection) : [];
return $this->render('Frontend/footer/footer.html.twig', ['text' => $text]);
}
}