app/Plugin/Seo42/Seo42Event.php line 34

Open in your IDE?
  1. <?php
  2. namespace Plugin\Seo42;
  3. use Eccube\Event\TemplateEvent;
  4. use Symfony\Component\EventDispatcher\EventSubscriberInterface;
  5. class Seo42Event implements EventSubscriberInterface
  6. {
  7.     /**
  8.      * {@inheritdoc}
  9.      *
  10.      * @return array
  11.      */
  12.     public static function getSubscribedEvents()
  13.     {
  14.         return [
  15.             'Product/list.twig' => ['onTemplateProductList'10],
  16.             'Product/detail.twig' => ['onTemplateProductDetail'10],
  17.         ];
  18.     }
  19.     /**
  20.      * @param TemplateEvent $templateEvent
  21.      */
  22.     public function onTemplateProductList(TemplateEvent $templateEvent)
  23.     {
  24.         $templateEvent->addSnippet('@Seo42/list.twig');
  25.     }
  26.     /**
  27.      * @param TemplateEvent $templateEvent
  28.      */
  29.     public function onTemplateProductDetail(TemplateEvent $templateEvent)
  30.     {
  31.         $templateEvent->addSnippet('@Seo42/detail.twig');
  32.     }
  33. }