app/Plugin/CheckProduct42/Controller/Block/CheckProductController.php line 39

Open in your IDE?
  1. <?php
  2. /*
  3.  * Copyright(c) 2019 SYSTEM FRIEND INC.
  4.  */
  5. namespace Plugin\CheckProduct42\Controller\Block;
  6. use Eccube\Controller\AbstractController;
  7. use Plugin\CheckProduct42\Service\CheckProductService;
  8. use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
  9. use Symfony\Component\HttpFoundation\Request;
  10. use Symfony\Component\Routing\Annotation\Route;
  11. class CheckProductController extends AbstractController
  12. {
  13.     protected CheckProductService $checkProductService;
  14.     /**
  15.      * CheckProductController constructor.
  16.      *
  17.      * @param CheckProductService $checkProductService
  18.      */
  19.     public function __construct(
  20.         CheckProductService  $checkProductService
  21.     )
  22.     {
  23.         $this->checkProductService $checkProductService;
  24.     }
  25.     /**
  26.      * @Route("/block/check_product42", name="block_check_product42")
  27.      * @Template("Block/check_product42.twig")
  28.      *
  29.      * @param Request $request
  30.      * @return array
  31.      */
  32.     public function index(Request $request)
  33.     {
  34.         return [
  35.             'CheckProducts' => $this->checkProductService->getCheckProducts(),
  36.         ];
  37.     }
  38. }