コード例 #1
0
ファイル: ReorderTest.php プロジェクト: steffenbrem/phpcr-odm
 public function testReorderParentProxy()
 {
     $first = $this->dm->find(null, '/functional/source/first');
     $parent = $first->getParentDocument();
     $this->dm->reorder($parent, 'first', 'second', false);
     $this->dm->flush();
     $this->assertSame(array('second', 'first', 'third', 'fourth'), $this->getChildrenNames($parent->getChildren()));
 }
コード例 #2
0
ファイル: PhpcrOdmTree.php プロジェクト: viral810/ngSimpleCMS
 /**
  * {@inheritDoc}
  */
 public function reorder($parent, $moved, $target, $before)
 {
     $parentDocument = $this->dm->find(null, $parent);
     $this->dm->reorder($parentDocument, basename($moved), basename($target), $before);
     $this->dm->flush();
 }