app/Plugin/ReportPdf2/ReportPdf2Event.php line 30

Open in your IDE?
  1. <?php
  2. /*
  3.  * This file is part of EC-CUBE
  4.  *
  5.  * Copyright(c) LOCKON CO.,LTD. All Rights Reserved.
  6.  *
  7.  * http://www.lockon.co.jp/
  8.  *
  9.  * For the full copyright and license information, please view the LICENSE
  10.  * file that was distributed with this source code.
  11.  */
  12. namespace Plugin\ReportPdf2;
  13. use Eccube\Event\TemplateEvent;
  14. use Symfony\Component\EventDispatcher\EventSubscriberInterface;
  15. class ReportPdf2Event implements EventSubscriberInterface
  16. {
  17.     public static function getSubscribedEvents()
  18.     {
  19.         return [
  20.             '@admin/Order/index.twig' => 'onRenderAdminOrder',
  21.             '@admin/Order/edit.twig' => 'onRenderAdminOrderEdit',
  22.             '@admin/Order/shipping.twig' => 'onRenderAdminOrderShipping',
  23.         ];
  24.     }
  25.     public function onRenderAdminOrder(TemplateEvent $event)
  26.     {
  27.         $event->addSnippet('@ReportPdf2/admin/add_btn.twig');
  28.     }
  29.     public function onRenderAdminOrderEdit(TemplateEvent $event)
  30.     {
  31.         $event->addSnippet('@ReportPdf2/admin/add_btn_edit.twig');
  32.     }
  33.     public function onRenderAdminOrderShipping(TemplateEvent $event)
  34.     {
  35.         $event->addSnippet('@ReportPdf2/admin/add_btn_shipping.twig');
  36.     }
  37. }