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