예제 #1
0
 /**
  * Delete objects preRemove instead of postRemove so that we have access to the id.  Because this is called
  * preRemove, first check that the entity is managed by Doctrine
  */
 public function preRemove(EventArgs $eventArgs)
 {
     $entity = $this->getDoctrineObject($eventArgs);
     if ($this->objectPersister->handlesObject($entity)) {
         $this->scheduleForDeletion($entity);
     }
 }
예제 #2
0
 /**
  * @param ProductInterface $product
  */
 private function addScheduledForUpdate(ProductInterface $product)
 {
     if ($this->objectPersister->handlesObject($product)) {
         $this->scheduledForUpdate[] = $product;
     }
 }