<?php
namespace Plugin\ProductRating42_dummy;
use Eccube\Event\TemplateEvent;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
class Event implements EventSubscriberInterface
{
/**
* @return array
*/
public static function getSubscribedEvents()
{
return [
'Product/list.twig' => 'list',
'Product/detail.twig' => 'detail',
];
}
/**
* @param TemplateEvent $event
*/
public function list(TemplateEvent $event){
$event->addSnippet('@ProductRating42_dummy/default/product_list_rating.twig');
}
/**
* @param TemplateEvent $event
*/
public function detail(TemplateEvent $event)
{
$event->addSnippet('@ProductRating42_dummy/default/rating.twig');
}
}