Ejemplo n.º 1
0
 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()));
 }
Ejemplo n.º 2
0
 /**
  * {@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();
 }