<?php
namespace Plugin\Seo42;
use Eccube\Event\TemplateEvent;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
class Seo42Event implements EventSubscriberInterface
{
/**
* {@inheritdoc}
*
* @return array
*/
public static function getSubscribedEvents()
{
return [
'Product/list.twig' => ['onTemplateProductList', 10],
'Product/detail.twig' => ['onTemplateProductDetail', 10],
];
}
/**
* @param TemplateEvent $templateEvent
*/
public function onTemplateProductList(TemplateEvent $templateEvent)
{
$templateEvent->addSnippet('@Seo42/list.twig');
}
/**
* @param TemplateEvent $templateEvent
*/
public function onTemplateProductDetail(TemplateEvent $templateEvent)
{
$templateEvent->addSnippet('@Seo42/detail.twig');
}
}