src/Controller/IndexController.php line 17

Open in your IDE?
  1. <?php
  2. namespace App\Controller;
  3. use App\Entity\Cart;
  4. use App\Packages\KedrClub\CalculateKedrClubService;
  5. use App\Packages\KedrClub\KedrClubCartObject;
  6. use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
  7. use Symfony\Component\HttpFoundation\Response;
  8. use Symfony\Component\Routing\Annotation\Route;
  9. use App\Service\Order\CreateOrderService;
  10. #[Route('/'name'main_')]
  11. class IndexController extends AbstractController
  12. {
  13.     #[Route(''name'index')]
  14.     public function actionMain(CalculateKedrClubService $calculateKedrClubServiceCreateOrderService $createOrderService): Response
  15.     {
  16.         $siteClose $this->getParameter('site_close');
  17.         if ($siteClose === 'YES') {
  18.             return $this->render('index/support.html.twig', [
  19.                 'seo' => [
  20.                     'title' => 'Новости и акции',
  21.                 ]
  22.             ]);
  23.         }
  24.         return $this->render('index/index.html.twig', [
  25.             'seo' => [
  26.                 'title' => 'Новости и акции',
  27.             ]
  28.         ]);
  29.     }
  30. }