app/Plugin/CancelPlugin/Event.php line 20

Open in your IDE?
  1. <?php
  2. namespace Plugin\CancelPlugin;
  3. use Eccube\Event\TemplateEvent;
  4. use Symfony\Component\EventDispatcher\EventSubscriberInterface;
  5. class Event implements EventSubscriberInterface
  6. {
  7.     /**
  8.      * @return array
  9.      */
  10.     public static function getSubscribedEvents()
  11.     {
  12.         return [
  13.             'Mypage/history.twig' => 'addCancelButton',
  14.         ];
  15.     }
  16.     public function addCancelButton(TemplateEvent $event)
  17.     {
  18.         $event->addSnippet('@CancelPlugin/default/Mypage/history_js.twig');
  19.     }
  20. }