app/Customize/Controller/TopController.php line 57

Open in your IDE?
  1. <?php
  2. /*
  3.  * This file is part of EC-CUBE
  4.  *
  5.  * Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved.
  6.  *
  7.  * http://www.ec-cube.co.jp/
  8.  *
  9.  * For the full copyright and license information, please view the LICENSE
  10.  * file that was distributed with this source code.
  11.  */
  12. namespace Customize\Controller;
  13. use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
  14. use Symfony\Component\Routing\Annotation\Route;
  15. use Eccube\Controller\AbstractController;
  16. use Eccube\Repository\CustomerRepository;
  17. use Eccube\Repository\ProductRepository;
  18. use Symfony\Component\HttpFoundation\Request;
  19. use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
  20. use Eccube\Entity\Product;
  21. class TopController extends AbstractController
  22. {
  23.     /**
  24.      * @var CustomerRepository
  25.      */
  26.     protected $customerRepository;
  27.     /**
  28.      * @var ProductRepository
  29.      */
  30.     protected $productRepository;
  31.     
  32.     /**
  33.      * ProductController constructor.
  34.      *
  35.      * @param CustomerRepository $customerRepository
  36.      * @param ProductRepository $productRepository
  37.      */
  38.     public function __construct(
  39.         CustomerRepository $customerRepository ,
  40.         ProductRepository $productRepository
  41.     ) {
  42.         $this->customerRepository $customerRepository;
  43.         $this->productRepository $productRepository;
  44.     }
  45.     /**
  46.      * @Route("/", name="homepage")
  47.      * @Template("index.twig")
  48.      */
  49.     public function index(Request $request)
  50.     {
  51.         return [];
  52.     }
  53.     
  54.     /**
  55.      * @Route("/shop-intro", name="shop_intro")
  56.      * @Template("Help/shop_intro.twig")
  57.      */    
  58.     public function shop_intro()
  59.     {
  60.         // if($this->getUser() == null)
  61.         // {    
  62.         //     return [];
  63.         // }
  64.         // else{
  65.         //     $Customer = $this->getUser();
  66.         //     $flag = $Customer->getCustomData(10);
  67.             
  68.         //     return [
  69.         //     'flag' => $flag
  70.         //     ];
  71.         // }
  72.        
  73.         return [
  74.            
  75.         ];
  76.         
  77.     }
  78.     
  79.     /**
  80.      * @Route("/special-sale", name="special_sale")
  81.      * @Template("Help/special_sale.twig")
  82.      */
  83.      public function special_sale(){
  84.       
  85.          return[
  86.           
  87.          ] ;
  88.      }
  89.      /**
  90.      * @Route("/hajimete", name="hajimete")
  91.      * @Template("Help/hajimete.twig")
  92.      */    
  93.      
  94.     public function hajimete(){
  95.       
  96.         return[
  97.          
  98.         ] ;
  99.     }
  100.     
  101. }