<?php
namespace Plugin\HigashiyamaForContact42\EventSubscriber\Controller;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Eccube\Event\TemplateEvent;
use Eccube\Common\EccubeConfig;
class ContactControllerSubscriber implements EventSubscriberInterface
{
/**
* @var EccubeConfig
*/
protected $eccubeConfig;
/**
* ProductController constructor.
*
* @param EccubeConfig $eccubeConfig
*/
public function __construct(
EccubeConfig $eccubeConfig
) {
$this->eccubeConfig = $eccubeConfig;
}
/**
* @return array
*/
public static function getSubscribedEvents()
{
return [
'Contact/index.twig' => ['DefaultContactIndex', 1],
'Contact/confirm.twig' => ['DefaultContactConfirm', 1],
];
}
/**
* @param TemplateEvent $event
*/
public function DefaultContactIndex(TemplateEvent $event)
{
$event->addSnippet('@HigashiyamaForContact42/default/Contact/index.twig');
}
/**
* @param TemplateEvent $event
*/
public function DefaultContactConfirm(TemplateEvent $event)
{
$event->addSnippet('@HigashiyamaForContact42/default/Contact/confirm.twig');
}
}