app/Plugin/SeoListDetail/SeoListDetailEvent.php line 29

Open in your IDE?
  1. <?php
  2. /*
  3.  * This file is part of EC-CUBE
  4.  *
  5.  * Copyright(c) LOCKON CO.,LTD. All Rights Reserved.
  6.  *
  7.  * http://www.lockon.co.jp/
  8.  *
  9.  * For the full copyright and license information, please view the LICENSE
  10.  * file that was distributed with this source code.
  11.  */
  12. namespace Plugin\SeoListDetail;
  13. use Eccube\Event\TemplateEvent;
  14. use Symfony\Component\EventDispatcher\EventSubscriberInterface;
  15. class SeoListDetailEvent implements EventSubscriberInterface
  16. {
  17.     public static function getSubscribedEvents()
  18.     {
  19.         return [
  20.             '@admin/Product/product.twig' => 'onAdminProduct',
  21.             '@admin/Product/category.twig' => 'onAdminCategory',
  22.         ];
  23.     }
  24.     public function onAdminProduct(TemplateEvent $event)
  25.     {
  26.         $event->addSnippet('@SeoListDetail/admin/add_product.twig');
  27.     }
  28.     
  29.     public function onAdminCategory(TemplateEvent $event)
  30.     {
  31.         $event->addSnippet('@SeoListDetail/admin/add_category.twig');
  32.     }
  33. }