app/Customize/Controller/CustomTradeLawController.php line 39

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\Repository\TradeLawRepository;
  14. use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
  15. use Symfony\Component\Routing\Annotation\Route;
  16. use Eccube\Controller\AbstractController;
  17. class CustomTradeLawController extends AbstractController
  18. {
  19.     /** @var TradeLawRepository */
  20.     protected $tradeLawRepository;
  21.     /**
  22.      * @param TradeLawRepository $tradeLawRepository
  23.      */
  24.     public function __construct(
  25.         TradeLawRepository $tradeLawRepository
  26.     ) {
  27.         $this->tradeLawRepository $tradeLawRepository;
  28.     }
  29.     /**
  30.      * @Route("/tradelaw", name="help_tradelaw", methods={"GET"})
  31.      * @Template("Help/tradelaw.twig")
  32.      */
  33.     public function index()
  34.     {
  35.         $tradelaws $this->tradeLawRepository->findBy([], ['sortNo' => 'ASC']);
  36.         return [
  37.             'tradelaws' => $tradelaws,
  38.         ];
  39.     }
  40. }