Doctrine\ORM\UnitOfWork::getScheduledCollectionDeletions PHP Method

getScheduledCollectionDeletions() public method

Get the currently scheduled complete collection deletions
    public function getScheduledCollectionDeletions()
    {
        return $this->collectionDeletions;
    }

Usage Example

 /**
  * @return array|CustomerIdentityInterface[]
  */
 protected function getChangedTrackedEntities()
 {
     $entities = array_merge($this->uow->getScheduledEntityInsertions(), $this->uow->getScheduledEntityDeletions(), $this->uow->getScheduledEntityUpdates());
     $collections = array_merge($this->uow->getScheduledCollectionDeletions(), $this->uow->getScheduledCollectionUpdates());
     /** @var PersistentCollection $collectionToChange */
     foreach ($collections as $collectionToChange) {
         $entities = array_merge($entities, $collectionToChange->unwrap()->toArray());
     }
     return array_filter($entities, function ($entity) {
         return $entity instanceof CustomerIdentityInterface && array_key_exists(ClassUtils::getClass($entity), $this->customerIdentities);
     });
 }
All Usage Examples Of Doctrine\ORM\UnitOfWork::getScheduledCollectionDeletions