app/Customize/Controller/MakerStockListController.php line 21

Open in your IDE?
  1. <?php
  2. namespace Customize\Controller;
  3. use Eccube\Controller\AbstractController;
  4. use Symfony\Component\HttpFoundation\Request;
  5. use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method;
  6. use Symfony\Component\Routing\Annotation\Route;
  7. use Symfony\Component\HttpFoundation\Response;
  8. use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
  9. use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
  10. class MakerStockListController extends AbstractController
  11. {
  12.     /**
  13.      * @Route("/maker_stock_list/", name="maker_stock_list", methods={"GET"})
  14.      * @Template("MakerStockList/maker_stock_list.twig")
  15.      */
  16.     public function index(ParameterBagInterface $params)
  17.     {
  18.         $directry $_SERVER['DOCUMENT_ROOT'] . $params->get('maker_stock_directry');
  19.         $maker_stock_files $params->get('maker_stock_files');
  20.         foreach($maker_stock_files as $maker_stock_file_key => $maker_stock_file_val){
  21.             $maker_stock_file_dates[$maker_stock_file_key] = date"Y/m/d"filemtime($directry $maker_stock_file_val));
  22.         } 
  23.         
  24.         return [
  25.             'maker_stock_file_dates' => $maker_stock_file_dates
  26.         ];
  27.     }
  28. }