Пример #1
0
 public function movePage($page, $newParentPage, $previousSiblingPage = null)
 {
     if ($previousSiblingPage !== null) {
         $this->pageRepository->persistAsNextSiblingOf($page, $previousSiblingPage);
     } else {
         $this->pageRepository->persistAsFirstChildOf($page, $newParentPage);
     }
     $this->objectManager->flush();
 }