/** * Moves the source node directly after the destination node * * @param stdClass $nodeData * @param int $destination * @return void */ public function moveNodeAfterDestination($nodeData, $destination) { /** @var $node t3lib_tree_pagetree_Node */ $node = t3lib_div::makeInstance('t3lib_tree_pagetree_Node', (array) $nodeData); try { t3lib_tree_pagetree_Commands::moveNode($node, -$destination); $newNode = t3lib_tree_pagetree_Commands::getNode($node->getId(), FALSE); $newNode->setLeaf($node->isLeafNode()); $returnValue = $newNode->toArray(); } catch (Exception $exception) { $returnValue = array('success' => FALSE, 'message' => $exception->getMessage()); } return $returnValue; }