app/Plugin/Higashiyama42/EventSubscriber/Controller/Admin/OrderControllerSubscriber.php line 44

Open in your IDE?
  1. <?php
  2. namespace Plugin\Higashiyama42\EventSubscriber\Controller\Admin;
  3. use Symfony\Component\EventDispatcher\EventSubscriberInterface;
  4. use Eccube\Common\EccubeConfig;
  5. use Eccube\Event\TemplateEvent;
  6. use Eccube\Event\EventArgs;
  7. use Eccube\Event\EccubeEvents;
  8. use Doctrine\ORM\EntityManagerInterface;
  9. use Plugin\Higashiyama42\Repository\Master\PurchaseTypeRepository;
  10. class OrderControllerSubscriber implements EventSubscriberInterface
  11. {
  12.     /**
  13.      * @var PurchaseTypeRepository
  14.      */
  15.     private $purchaseTypeRepository;
  16.     /**
  17.      * Event constructor.
  18.      * @param PurchaseTypeRepository $purchaseTypeRepository
  19.      */
  20.     public function __construct(
  21.         PurchaseTypeRepository $purchaseTypeRepository
  22.     ) {
  23.         $this->purchaseTypeRepository $purchaseTypeRepository;
  24.     }
  25.     /**
  26.      * @return array
  27.      */
  28.     public static function getSubscribedEvents()
  29.     {
  30.         return [
  31.             '@admin/Order/index.twig' => ['AdminOrderIndex'1],
  32.         ];
  33.     }
  34.     /**
  35.      * @param TemplateEvent $event
  36.      */
  37.     public function AdminOrderIndex(TemplateEvent $event)
  38.     {
  39.         $event->addSnippet('@Higashiyama42/admin/Order/index.twig');
  40.     }
  41. }