app/Plugin/MGSocialButton/MGSocialButtonEvent.php line 19

Open in your IDE?
  1. <?php
  2. namespace Plugin\MGSocialButton;
  3. use Eccube\Event\TemplateEvent;
  4. use Symfony\Component\EventDispatcher\EventSubscriberInterface;
  5. class MGSocialButtonEvent implements EventSubscriberInterface
  6. {
  7.     /**
  8.      * @return array
  9.      */
  10.     public static function getSubscribedEvents()
  11.     {
  12.         return [
  13.             'Product/detail.twig' => 'detail',
  14.         ];
  15.     }
  16.     public function detail(TemplateEvent $event)
  17.     {
  18.         $twig '@MGSocialButton/social_button.twig';
  19.         $event->addSnippet($twig);
  20.     }
  21. }