app/Plugin/PostCarrier4/EventListener/ConversionTagListener.php line 37

Open in your IDE?
  1. <?php
  2. /*
  3.  * This file is part of PostCarrier for EC-CUBE
  4.  *
  5.  * Copyright(c) IPLOGIC CO.,LTD. All Rights Reserved.
  6.  *
  7.  * http://www.iplogic.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\PostCarrier4\EventListener;
  13. use Eccube\Event\TemplateEvent;
  14. use Plugin\PostCarrier4\Repository\PostCarrierConfigRepository;
  15. use Symfony\Component\EventDispatcher\EventSubscriberInterface;
  16. class ConversionTagListener implements EventSubscriberInterface
  17. {
  18.     /**
  19.      * @var PostCarrierConfigRepository
  20.      */
  21.     protected $configRepository;
  22.     /**
  23.      * ConversionTagListener constructor.
  24.      *
  25.      * @param PostCarrierConfigRepository $configRepository
  26.      */
  27.     public function __construct(PostCarrierConfigRepository $configRepository)
  28.     {
  29.         $this->configRepository $configRepository;
  30.     }
  31.     public function shopping_complete(TemplateEvent $event)
  32.     {
  33.         $event->addSnippet('@PostCarrier4/cv.twig');
  34.     }
  35.     public static function getSubscribedEvents()
  36.     {
  37.         return [
  38.             'Shopping/complete.twig' => 'shopping_complete',
  39.         ];
  40.     }
  41. }