/** * Inserts a new node directly after the destination node and returns the created node. * * @param stdClass $parentNodeData * @param int $destination * @param int $pageType * @return array */ public function insertNodeAfterDestination($parentNodeData, $destination, $pageType) { /** @var $parentNode t3lib_tree_pagetree_Node */ $parentNode = t3lib_div::makeInstance('t3lib_tree_pagetree_Node', (array) $parentNodeData); try { $newPageId = t3lib_tree_pagetree_Commands::createNode($parentNode, -$destination, $pageType); $returnValue = t3lib_tree_pagetree_Commands::getNode($newPageId)->toArray(); } catch (Exception $exception) { $returnValue = array('success' => FALSE, 'message' => $exception->getMessage()); } return $returnValue; }