app/Customize/Controller/TopController.php line 27

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 Eccube\Controller\TopController as BaseTopController;
  14. use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
  15. use Symfony\Component\Routing\Annotation\Route;
  16. class TopController extends BaseTopController
  17. {
  18.   /**
  19.    * @Route("/", name="homepage", methods={"GET"})
  20.    * @Template("index.twig")
  21.    */
  22.   public function index()
  23.   {
  24.     // echo "aaaaaaaaa";
  25.     if ($this->isGranted('ROLE_USER')) {
  26.       return $this->redirectToRoute('product_detail', ['id' => 1]);
  27.     }
  28.     return [];
  29.   }
  30. }