<?php
namespace Plugin\Higashiyama42\EventSubscriber\Controller\Admin;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Eccube\Common\EccubeConfig;
use Eccube\Event\TemplateEvent;
use Eccube\Event\EventArgs;
use Eccube\Event\EccubeEvents;
use Doctrine\ORM\EntityManagerInterface;
use Plugin\Higashiyama42\Repository\Master\PurchaseTypeRepository;
class OrderControllerSubscriber implements EventSubscriberInterface
{
/**
* @var PurchaseTypeRepository
*/
private $purchaseTypeRepository;
/**
* Event constructor.
* @param PurchaseTypeRepository $purchaseTypeRepository
*/
public function __construct(
PurchaseTypeRepository $purchaseTypeRepository
) {
$this->purchaseTypeRepository = $purchaseTypeRepository;
}
/**
* @return array
*/
public static function getSubscribedEvents()
{
return [
'@admin/Order/index.twig' => ['AdminOrderIndex', 1],
];
}
/**
* @param TemplateEvent $event
*/
public function AdminOrderIndex(TemplateEvent $event)
{
$event->addSnippet('@Higashiyama42/admin/Order/index.twig');
}
}