app/Customize/Controller/Block/ListController.php line 43

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\Block;
  13. use Eccube\Controller\AbstractController;
  14. use Eccube\Entity\Product;
  15. use Eccube\Repository\ProductRepository;
  16. use Symfony\Component\HttpFoundation\Request;
  17. use Symfony\Component\Routing\Annotation\Route;
  18. use Eccube\Form\Type\AddCartType;
  19. class ListController extends AbstractController
  20. {
  21.     /**
  22.      * @var ProductRepository
  23.      */
  24.     protected $productRepository;
  25.     public function __construct(
  26.         ProductRepository $productRepository
  27.     ) {
  28.         $this->productRepository $productRepository;
  29.     }
  30.     /**
  31.      * @Route("/block/list", name="block_list", methods={"GET"})
  32.      */
  33.     public function index(Request $request)
  34.     {
  35.         $Products = [];
  36.         $Products $this->productRepository->findBy([
  37.             'Status' => 1
  38.         ]);
  39.         
  40.        
  41.         return $this->render('Block/list.twig', [
  42.                             ]);
  43.     }
  44. }