<?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;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\HttpFoundation\Request;
use Eccube\Controller\AbstractController;
use Eccube\Repository\ProductRepository;
class TopCustomizeController extends AbstractController
{
/**
* ProductRepositoryのインスタンスを保持するプロパティ
* @var ProductRepository
*/
protected $productRepository;
/**
* コンストラクタでProductRepositoryのインスタンスを注入
* @param ProductRepository $productRepository
*/
public function __construct(ProductRepository $productRepository)
{
$this->productRepository = $productRepository;
}
/**
* @Route("/", name="homepage", methods={"GET"})
* @Template("index.twig")
*/
public function index(Request $request)
{
$Result3 = $this->productRepository->find(3);
$Result4 = $this->productRepository->find(4);
$Result5 = $this->productRepository->find(5);
$Result6 = $this->productRepository->find(6);
$Result7 = $this->productRepository->find(7);
$Result8 = $this->productRepository->find(8);
$Result9 = $this->productRepository->find(9);
$Result10 = $this->productRepository->find(10);
$Result11 = $this->productRepository->find(11);
$Result12 = $this->productRepository->find(12);
$Result13 = $this->productRepository->find(13);
$Result14 = $this->productRepository->find(14);
$Result15 = $this->productRepository->find(15);
$Result16 = $this->productRepository->find(16);
$Result17 = $this->productRepository->find(17);
$Result18 = $this->productRepository->find(18);
$Result19 = $this->productRepository->find(19);
$Result20 = $this->productRepository->find(20);
$Result21 = $this->productRepository->find(21);
$Result22 = $this->productRepository->find(22);
$Result23 = $this->productRepository->find(23);
$Result24 = $this->productRepository->find(24);
$Result25 = $this->productRepository->find(25);
$Result26 = $this->productRepository->find(26);
$Result27 = $this->productRepository->find(27);
$Result28 = $this->productRepository->find(28);
return [
// Twigテンプレートに渡す変数「Product」に、$Sampleのデータを設定
'Product3' => $Result3,
'Product4' => $Result4,
'Product5' => $Result5,
'Product6' => $Result6,
'Product7' => $Result7,
'Product8' => $Result8,
'Product9' => $Result9,
'Product10' => $Result10,
'Product11' => $Result11,
'Product12' => $Result12,
'Product13' => $Result13,
'Product14' => $Result14,
'Product15' => $Result15,
'Product16' => $Result16,
'Product17' => $Result17,
'Product18' => $Result18,
'Product19' => $Result19,
'Product20' => $Result20,
'Product21' => $Result21,
'Product22' => $Result22,
'Product23' => $Result23,
'Product24' => $Result24,
'Product25' => $Result25,
'Product26' => $Result26,
'Product27' => $Result27,
'Product28' => $Result28
];
}
public function redirect2() {
$this->redirectToRoute('user_data/renewal');
}
}