vendor/sylius/sylius/src/Sylius/Bundle/ShopBundle/Controller/HomepageController.php line 34

Open in your IDE?
  1. <?php
  2. /*
  3.  * This file is part of the Sylius package.
  4.  *
  5.  * (c) Paweł Jędrzejewski
  6.  *
  7.  * For the full copyright and license information, please view the LICENSE
  8.  * file that was distributed with this source code.
  9.  */
  10. declare(strict_types=1);
  11. namespace Sylius\Bundle\ShopBundle\Controller;
  12. use Symfony\Bundle\FrameworkBundle\Templating\EngineInterface;
  13. use Symfony\Component\HttpFoundation\Request;
  14. use Symfony\Component\HttpFoundation\Response;
  15. use Twig\Environment;
  16. final class HomepageController
  17. {
  18.     /** @var EngineInterface|Environment */
  19.     private $templatingEngine;
  20.     /**
  21.      * @param EngineInterface|Environment $templatingEngine
  22.      */
  23.     public function __construct(object $templatingEngine)
  24.     {
  25.         $this->templatingEngine $templatingEngine;
  26.     }
  27.     public function indexAction(Request $request): Response
  28.     {
  29.         return new Response($this->templatingEngine->render('@SyliusShop/Homepage/index.html.twig'));
  30.     }
  31. }