app/Plugin/CustomerGroupRank42/Event.php line 36

Open in your IDE?
  1. <?php
  2. /*
  3.  * This file is part of CustomerGroupRank
  4.  *
  5.  * Copyright(c) Akira Kurozumi <info@a-zumi.net>
  6.  *
  7.  * https://a-zumi.net
  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\CustomerGroupRank42;
  13. use Eccube\Event\TemplateEvent;
  14. use Symfony\Component\EventDispatcher\EventSubscriberInterface;
  15. class Event implements EventSubscriberInterface
  16. {
  17.     /**
  18.      * @return string[]
  19.      */
  20.     public static function getSubscribedEvents(): array
  21.     {
  22.         return [
  23.             '@CustomerGroup42/admin/Customer/Group/edit.twig' => 'onTemplateAdminCustomerGroupEdit',
  24.         ];
  25.     }
  26.     /**
  27.      * @param TemplateEvent $event
  28.      *
  29.      * @return void
  30.      */
  31.     public function onTemplateAdminCustomerGroupEdit(TemplateEvent $event): void
  32.     {
  33.         $event->addSnippet('@CustomerGroupRank42/admin/Customer/Group/edit.twig');
  34.     }
  35. }