vendor/launchpad/backend/src/Base/EventSubscriber/Account/AccountEventSubscriber.php line 31

Open in your IDE?
  1. <?php
  2. namespace LaunchPad\Bundle\LaunchPadBundle\Base\EventSubscriber\Account;
  3. use LaunchPad\Bundle\LaunchPadBundle\Base\Service\Processor\GPS\GpsImportHandler;
  4. use Psr\Container\ContainerInterface;
  5. use Symfony\Component\EventDispatcher\EventSubscriberInterface;
  6. use Symfony\Component\EventDispatcher\GenericEvent;
  7. class AccountEventSubscriber implements EventSubscriberInterface
  8. {
  9.     private $container;
  10.     public function __construct(ContainerInterface $container)
  11.     {
  12.         $this->container $container;
  13.     }
  14.     public static function getSubscribedEvents()
  15.     {
  16.         return array(
  17.             GpsImportHandler::GPS_ACCOUNT_UPDATE    => 'accountUpdate',
  18.         );
  19.     }
  20.     /**
  21.      * Document requested
  22.      *
  23.      * @param GenericEvent $event
  24.      */
  25.     public function accountUpdate(GenericEvent $event)
  26.     {
  27.         $data $event->getSubject();
  28.         $this->container->get('lp.card')->updateCardFromImport($data['token'], $data['data']);
  29.     }
  30. }