Doctrine\ORM\UnitOfWork::getScheduledCollectionUpdates PHP Method

getScheduledCollectionUpdates() public method

Gets the currently scheduled collection inserts, updates and deletes.
    public function getScheduledCollectionUpdates()
    {
        return $this->collectionUpdates;
    }

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::getScheduledCollectionUpdates