Doctrine\ODM\PHPCR\UnitOfWork::getScheduledUpdates PHP Method

getScheduledUpdates() public method

Gets the currently scheduled document updates in this UnitOfWork.
public getScheduledUpdates ( ) : array
return array
    public function getScheduledUpdates()
    {
        return $this->scheduledUpdates;
    }

Usage Example

Beispiel #1
0
 public function testComputeChangeSetForTranslatableDocument()
 {
     $root = $this->dm->find(null, 'functional');
     $c1 = new Comment();
     $c1->name = 'c1';
     $c1->parent = $root;
     $c1->setText('deutsch');
     $this->dm->persist($c1);
     $this->dm->bindTranslation($c1, 'de');
     $c1->setText('english');
     $this->dm->bindTranslation($c1, 'en');
     $this->dm->flush();
     $c2 = new Comment();
     $c2->name = 'c2';
     $c2->parent = $root;
     $c2->setText('deutsch');
     $this->dm->persist($c2);
     $this->dm->bindTranslation($c2, 'de');
     $c2->setText('english');
     $this->dm->bindTranslation($c2, 'en');
     $this->uow->computeChangeSets();
     $this->assertCount(1, $this->uow->getScheduledInserts());
     $this->assertCount(0, $this->uow->getScheduledUpdates());
 }
UnitOfWork