<?php
/*
* This file is part of EC-CUBE
*
* Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved.
*
* http://www.ec-cube.co.jp/
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Customize\Controller\Block;
use Eccube\Controller\AbstractController;
use Eccube\Entity\Product;
use Eccube\Repository\ProductRepository;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Routing\Annotation\Route;
use Eccube\Form\Type\AddCartType;
class ListController extends AbstractController
{
/**
* @var ProductRepository
*/
protected $productRepository;
public function __construct(
ProductRepository $productRepository
) {
$this->productRepository = $productRepository;
}
/**
* @Route("/block/list", name="block_list", methods={"GET"})
*/
public function index(Request $request)
{
$Products = [];
$Products = $this->productRepository->findBy([
'Status' => 1
]);
return $this->render('Block/list.twig', [
]);
}
}