<?php
namespace Eccube\Controller;
use Eccube\Repository\CategoryRepository;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\HttpFoundation\Response;
class CategoryListController extends AbstractController
{
/**
* @var CategoryRepository
*/
protected $categoryRepository;
public function __construct(CategoryRepository $categoryRepository)
{
$this->categoryRepository = $categoryRepository;
}
/**
* @Route("/category_list", name="category_list")
*/
public function index()
{
$Categories = $this->categoryRepository->getList(null, true);
return $this->render('category.twig', [
'Categories' => $Categories,
]);
}
}