app/Plugin/DeliveryPlus42/Event/AdminSettingEvent.php line 30

Open in your IDE?
  1. <?php
  2. /*
  3. * Plugin Name : DeliveryPlus4
  4. *
  5. * Copyright (C) BraTech Co., Ltd. All Rights Reserved.
  6. * http://www.bratech.co.jp/
  7. *
  8. * For the full copyright and license information, please view the LICENSE
  9. * file that was distributed with this source code.
  10. */
  11. namespace Plugin\DeliveryPlus42\Event;
  12. use Eccube\Event\TemplateEvent;
  13. use Symfony\Component\EventDispatcher\EventSubscriberInterface;
  14. class AdminSettingEvent implements EventSubscriberInterface
  15. {
  16.     /**
  17.      * @return array
  18.      */
  19.     public static function getSubscribedEvents()
  20.     {
  21.         return [
  22.             '@admin/Setting/Shop/delivery_edit.twig' => 'onTemplateAdminSettingShopDeliveryEdit',
  23.         ];
  24.     }
  25.     public function onTemplateAdminSettingShopDeliveryEdit(TemplateEvent $event)
  26.     {
  27.         $twig '@DeliveryPlus42/admin/Setting/Shop/delivery_condition.twig';
  28.         $event->addSnippet($twig);
  29.         $js '@DeliveryPlus42/admin/Setting/Shop/delivery_condition.js';
  30.         $event->addAsset($js);
  31.     }
  32. }