src/Hitso/Bundle/CommonBundle/Controller/Front/HomePageController.php line 18

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace Hitso\Bundle\CommonBundle\Controller\Front;
  4. use Hitso\Bundle\CommonBundle\Controller\Controller;
  5. use Hitso\Bundle\SeoBundle\Entity\SeoPage;
  6. use Symfony\Component\HttpFoundation\Response;
  7. /**
  8.  * Class HomePageController
  9.  *
  10.  * @package Hitso\Bundle\CommonBundle\Controller\Front
  11.  */
  12. class HomePageController extends Controller
  13. {
  14.     public function indexAction(): Response
  15.     {
  16.         $content $this->getManagerForClass(SeoPage::class)->getRepository()->findOneBy(['route' => 'homepage']);
  17.         if ($content) {
  18.             $this->updateSeoPage($content);
  19.         }
  20.         return $this->displayTemplate('index');
  21.     }
  22. }