Doctrine\ORM\UnitOfWork::isScheduledForDelete PHP Method

isScheduledForDelete() public method

Checks whether an entity is registered as removed/deleted with the unit of work.
public isScheduledForDelete ( object $entity ) : boolean
$entity object
return boolean
    public function isScheduledForDelete($entity)
    {
        return isset($this->entityDeletions[spl_object_hash($entity)]);
    }

Usage Example

 /**
  * @param B2bCustomer $b2bCustomer
  */
 protected function scheduleUpdate(B2bCustomer $b2bCustomer)
 {
     if ($this->uow->isScheduledForDelete($b2bCustomer)) {
         return;
     }
     $this->queued[$b2bCustomer->getId()] = $b2bCustomer;
 }
All Usage Examples Of Doctrine\ORM\UnitOfWork::isScheduledForDelete