src/EventSubscriber/Import/MovingCompany.php line 21

Open in your IDE?
  1. <?php
  2. namespace App\EventSubscriber\Import;
  3. use App\Entity\User;
  4. use App\Service\Import\CustomRowEvent;
  5. use Symfony\Component\EventDispatcher\EventSubscriberInterface;
  6. class MovingCompany implements EventSubscriberInterface
  7. {
  8.     public static function getSubscribedEvents(): array
  9.     {
  10.         return [
  11.             CustomRowEvent::NAME => ['customRow'],
  12.         ];
  13.     }
  14.     /**
  15.      * @return void
  16.      */
  17.     public function customRow(CustomRowEvent $event)
  18.     {
  19.         if ($event->getEntity() != User::class) {
  20.             return;
  21.         }
  22.         $row $event->getData();
  23. //        dd($row);
  24.         $event->setData($row);
  25.     }
  26. }