<?php
namespace Plugin\ElabDisableGuest42;
use Eccube\Event\TemplateEvent;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
class ElabDisableGuestEvent implements EventSubscriberInterface
{
/**
* @return array
*/
public static function getSubscribedEvents()
{
return [
'Shopping/login.twig' => 'disableGuest',
];
}
public function disableGuest(TemplateEvent $event)
{
$cssTwig = '@ElabDisableGuest42/Shopping/login_css.twig';
$event->addAsset($cssTwig);
$jsTwig = '@ElabDisableGuest42/Shopping/login_js.twig';
$event->addSnippet($jsTwig);
}
}