SHARE
TWEET

Untitled

a guest Aug 12th, 2017 50 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. namespace Application\UserBundle\Service;
  3.  
  4. use Doctrine\ODM\MongoDB\Event\LifecycleEventArgs;
  5.  
  6. class UserEvents {
  7.  
  8.   public function prePersist(LifecycleEventArgs $eventArgs)
  9.   {
  10.  
  11.       echo "TEST";
  12.       $dm   = $eventArgs->getDocumentManager();
  13.       $user = $eventArgs->getDocument();
  14.      
  15.       $user->updateVcardsOnPostPersist();
  16.  
  17.   }
  18.  
  19. }
RAW Paste Data
Top