app/Plugin/ElabDisableGuest42/ElabDisableGuestEvent.php line 20

Open in your IDE?
  1. <?php
  2. namespace Plugin\ElabDisableGuest42;
  3. use Eccube\Event\TemplateEvent;
  4. use Symfony\Component\EventDispatcher\EventSubscriberInterface;
  5. class ElabDisableGuestEvent implements EventSubscriberInterface
  6. {
  7.     /**
  8.      * @return array
  9.      */
  10.     public static function getSubscribedEvents()
  11.     {
  12.         return [
  13.             'Shopping/login.twig' => 'disableGuest',
  14.         ];
  15.     }
  16.     public function disableGuest(TemplateEvent $event)
  17.     {
  18.         $cssTwig '@ElabDisableGuest42/Shopping/login_css.twig';
  19.         $event->addAsset($cssTwig);
  20.         $jsTwig '@ElabDisableGuest42/Shopping/login_js.twig';
  21.         $event->addSnippet($jsTwig);
  22.     }
  23. }