custom/plugins/MegasolBase/src/Subscriber/PasswordRecoverySubscriber.php line 28

Open in your IDE?
  1. <?php declare(strict_types=1);
  2. namespace Megasol\MegasolBase\Subscriber;
  3. use Shopware\Core\Framework\DataAbstractionLayer\EntityRepositoryInterface;
  4. use Shopware\Core\Framework\Event\BusinessEvents;
  5. use Symfony\Component\EventDispatcher\EventSubscriberInterface;
  6. class PasswordRecoverySubscriber implements EventSubscriberInterface
  7. {
  8.     /**
  9.      * @var EntityRepositoryInterface
  10.      */
  11.     private $customerRecoveryRepository;
  12.     public static function getSubscribedEvents(): array
  13.     {
  14.         // Return the events to listen to as array like this:  <event to listen to> => <method to execute>
  15.         return [
  16.             BusinessEvents::CUSTOMER_ACCOUNT_RECOVER_REQUEST => 'onCustomerPasswordRecovery'
  17.         ];
  18.     }
  19.     public function onCustomerPasswordRecovery(): void
  20.     {
  21.         /*
  22.         dump($_POST);
  23.         dump('This is a Event listener Carefully listen!!!!!');
  24.         dump('hehe');
  25.         die();
  26.         */
  27.     }
  28. }