src/Controller/DefaultController.php line 37

Open in your IDE?
  1. <?php
  2. /**
  3.  * Created by PhpStorm.
  4.  * User: oleksandrarhat
  5.  * Date: 2020-03-09
  6.  * Time: 21:20
  7.  */
  8. namespace App\Controller;
  9. use App\Entity\Cart;
  10. use App\Entity\Product;
  11. use App\Repository\ProductRepository;
  12. use App\Util\UserSettingHandler;
  13. use App\Util\MailHandler;
  14. use App\Zet\CrossBundle\Entity\Tcd\TcdBrand;
  15. use App\Zet\CrossBundle\Entity\Tcd\TcdCross;
  16. use App\Zet\V8Bundle\Util\V8Client;
  17. use Knp\Component\Pager\PaginatorInterface;
  18. use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
  19. use Symfony\Component\Routing\Annotation\Route;
  20. use Symfony\Component\HttpFoundation\Request;
  21. use Sensio\Bundle\FrameworkExtraBundle\Configuration\IsGranted;
  22. class DefaultController extends AbstractController
  23. {
  24.     private $mailHandler;
  25.     function __construct(MailHandler $mailHandler){
  26.         $this->mailHandler $mailHandler;
  27.     }
  28.     /**
  29.      * @Route("/default", name="default")
  30.      */
  31.     public function index()
  32.     {
  33.         return $this->render('default/index.html.twig');
  34.     }
  35.     /**
  36.      * @Route("/unsubscribe", name="default")
  37.      */
  38.     public function unsubscribe()
  39.     {
  40.         return $this->render('default/index.html.twig');
  41.     }
  42.     /**
  43.      * @Route("/twig", name="twig")
  44.      * @IsGranted("IS_AUTHENTICATED_FULLY")
  45.      */
  46.     function twigAction()
  47.     {
  48.         return $this->render('default/twig.html.twig',
  49.             [
  50.                 'data' => []
  51.             ]
  52.         );
  53.     }
  54.     /**
  55.      * @Route("/login", name="default_login")
  56.      */
  57.     public function loginAction()
  58.     {
  59.         return $this->render('default/index.html.twig');
  60.     }
  61.     /**
  62.      * @Route("/cabinet/{segment1}", name="cabinet")
  63.      */
  64.     public function cabinetAction($segment1 '')
  65.     {
  66.         return $this->render('default/index.html.twig');
  67.     }
  68.     /**
  69.      * @Route("/catalog/{segment1}", name="catalog")
  70.      */
  71.     public function catalogAction($segment1 '')
  72.     {
  73.         return $this->render('default/index.html.twig');
  74.     }
  75.     /**
  76.      * @Route("/profile", name="profile")
  77.      */
  78.     public function profileAction()
  79.     {
  80.         return $this->render('default/index.html.twig');
  81.     }
  82.     /**
  83.      * @Route("/content/{segment1}/{segment2}", name="content")
  84.      */
  85.     public function contentAction($segment1 ''$segment2 '')
  86.     {
  87.         return $this->render('default/index.html.twig');
  88.     }
  89.     /**
  90.      * @Route("/product/{segment1}", name="product")
  91.      */
  92.     public function productAction($segment1 '')
  93.     {
  94.         return $this->render('default/index.html.twig');
  95.     }
  96.     /**
  97.      * @Route("/cart/{segment1}/{segment2}", name="cart")
  98.      */
  99.     public function cartAction($segment1 ''$segment2 '')
  100.     {
  101.         return $this->render('default/index.html.twig');
  102.     }
  103.     /**
  104.      * @Route("/order/{segment1}", name="order")
  105.      */
  106.     public function orderAction($segment1 '')
  107.     {
  108.         return $this->render('default/index.html.twig');
  109.     }
  110.     /**
  111.      * @Route("/deep-order/{segment1}", name="deep-order")
  112.      */
  113.     public function deepOrderAction($segment1 '')
  114.     {
  115.         return $this->render('default/index.html.twig');
  116.     }
  117.     /**
  118.      * @Route("/checkout/{segment1}", name="checkout")
  119.      */
  120.     public function checkoutAction($segment1 '')
  121.     {
  122.         return $this->render('default/index.html.twig');
  123.     }
  124.     /**
  125.      * @Route("/error/{segment1}", name="error")
  126.      */
  127.     public function errorAction($segment1 '')
  128.     {
  129.         return $this->render('default/index.html.twig');
  130.     }
  131.     /**
  132.      * @Route("/user/password-reset/{segment1}", name="password_reset")
  133.      */
  134.     public function passwordResetAction($segment1 " "){
  135.         return $this->render('default/index.html.twig');
  136.     }
  137.     /**
  138.      * @Route("/rest", name="rest")
  139.      */
  140.     public function restAction(V8Client $client){
  141.         echo $client->check();
  142.     }
  143.     /**
  144.      * @Route("/signup")
  145.      */
  146.     public function signupAction($segment1 " "){
  147.         return $this->render('default/index.html.twig');
  148.     }
  149.     /**
  150.      * @Route("/manager/{segment1}/{segment2}/{segment3}")
  151.      */
  152.     public function managerAction($segment1 " "$segment2 " "$segment3 ""){
  153.         return $this->render('default/index.html.twig');
  154.     }
  155.     /**
  156.      * @Route("/user-admin/{segment1}/{segment2} ", name="user-admin")
  157.      */
  158.     public function useradminAction($segment1 " "$segment2 " "){
  159.         return $this->render('default/index.html.twig');
  160.     }
  161.     /**
  162.      * @Route("/cart-owner{segment1}/{segment2}", name="cart-owner")
  163.      */
  164.     public function cartownerAction($segment1 " "$segment2 " "){
  165.         return $this->render('default/index.html.twig');
  166.     }
  167. }