<?php
namespace Plugin\NZCustomPlugin\Event;
use Eccube\Event\TemplateEvent;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
class NZCustomPluginEvent implements EventSubscriberInterface
{
/**
* {@inheritdoc}
*/
public static function getSubscribedEvents()
{
return [
'Mypage/login.twig' => 'onMypageLoginTwig',
];
}
/**
* ログイン画面のテンプレートイベント
*/
public function onMypageLoginTwig(TemplateEvent $event)
{
// フォームからのリダイレクトの場合、メッセージを追加
$parameters = $event->getParameters();
// JavaScriptでフォームへの案内メッセージを表示
$event->addSnippet('@NZCustomPlugin/default/login_message.twig');
}
}