<?php
namespace Customize\Controller;
use Eccube\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Request;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\HttpFoundation\Response;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
class MakerStockListController extends AbstractController
{
/**
* @Route("/maker_stock_list/", name="maker_stock_list", methods={"GET"})
* @Template("MakerStockList/maker_stock_list.twig")
*/
public function index(ParameterBagInterface $params)
{
$directry = $_SERVER['DOCUMENT_ROOT'] . $params->get('maker_stock_directry');
$maker_stock_files = $params->get('maker_stock_files');
foreach($maker_stock_files as $maker_stock_file_key => $maker_stock_file_val){
$maker_stock_file_dates[$maker_stock_file_key] = date( "Y/m/d", filemtime($directry . $maker_stock_file_val));
}
return [
'maker_stock_file_dates' => $maker_stock_file_dates
];
}
}