<?php
namespace Plugin\CancelPlugin;
use Eccube\Event\TemplateEvent;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
class Event implements EventSubscriberInterface
{
/**
* @return array
*/
public static function getSubscribedEvents()
{
return [
'Mypage/history.twig' => 'addCancelButton',
];
}
public function addCancelButton(TemplateEvent $event)
{
$event->addSnippet('@CancelPlugin/default/Mypage/history_js.twig');
}
}