/**
  * Updates the given field with a new text value, may be used to inline update
  * the title field in the new page tree
  *
  * @param stdClass $nodeData
  * @param string $updatedLabel
  * @return array
  */
 public function updateLabel($nodeData, $updatedLabel)
 {
     if ($updatedLabel === '') {
         return array();
     }
     /** @var $node t3lib_tree_pagetree_Node */
     $node = t3lib_div::makeInstance('t3lib_tree_pagetree_Node', (array) $nodeData);
     try {
         t3lib_tree_pagetree_Commands::updateNodeLabel($node, $updatedLabel);
         $shortendedText = t3lib_div::fixed_lgd_cs($updatedLabel, intval($GLOBALS['BE_USER']->uc['titleLen']));
         $returnValue = array('editableText' => $updatedLabel, 'updatedText' => htmlspecialchars($shortendedText));
     } catch (Exception $exception) {
         $returnValue = array('success' => FALSE, 'message' => $exception->getMessage());
     }
     return $returnValue;
 }