34 public function visiblyNode($nodeData) {
40 $newNode->setLeaf($node->isLeafNode());
41 $returnValue = $newNode->toArray();
42 }
catch (\Exception $exception) {
45 'error' => $exception->getMessage()
57 public function disableNode($nodeData) {
63 $newNode->setLeaf($node->isLeafNode());
64 $returnValue = $newNode->toArray();
65 }
catch (\Exception $exception) {
68 'message' => $exception->getMessage()
80 public function deleteNode($nodeData) {
85 $returnValue = array();
86 if (
$GLOBALS[
'BE_USER']->workspace) {
88 if ($record[
'_ORIG_uid']) {
89 $newNode = Commands::getNewNode($record);
90 $returnValue = $newNode->toArray();
93 }
catch (\Exception $exception) {
96 'message' => $exception->getMessage()
109 public function restoreNode($nodeData, $destination) {
115 $returnValue = $newNode->toArray();
116 }
catch (\Exception $exception) {
117 $returnValue = array(
119 'message' => $exception->getMessage()
133 public function updateLabel($nodeData, $updatedLabel) {
134 if ($updatedLabel ===
'') {
142 $returnValue = array(
143 'editableText' => $updatedLabel,
144 'updatedText' => htmlspecialchars($shortendedText)
146 }
catch (\Exception $exception) {
147 $returnValue = array(
149 'message' => $exception->getMessage()
161 static public function setTemporaryMountPoint($nodeData) {
164 $GLOBALS[
'BE_USER']->uc[
'pageTree_temporaryMountPoint'] = $node->getId();
176 public function moveNodeToFirstChildOfDestination($nodeData, $destination) {
182 $newNode->setLeaf($node->isLeafNode());
183 $returnValue = $newNode->toArray();
184 }
catch (\Exception $exception) {
185 $returnValue = array(
187 'message' => $exception->getMessage()
200 public function moveNodeAfterDestination($nodeData, $destination) {
206 $newNode->setLeaf($node->isLeafNode());
207 $returnValue = $newNode->toArray();
208 }
catch (\Exception $exception) {
209 $returnValue = array(
211 'message' => $exception->getMessage()
225 public function copyNodeToFirstChildOfDestination($nodeData, $destination) {
233 $newNode->setLeaf($node->isLeafNode());
234 $returnValue = $newNode->toArray();
235 }
catch (\Exception $exception) {
236 $returnValue = array(
238 'message' => $exception->getMessage()
252 public function copyNodeAfterDestination($nodeData, $destination) {
260 $newNode->setLeaf($node->isLeafNode());
261 $returnValue = $newNode->toArray();
262 }
catch (\Exception $exception) {
263 $returnValue = array(
265 'message' => $exception->getMessage()
278 public function insertNodeToFirstChildOfDestination($parentNodeData, $pageType) {
284 }
catch (\Exception $exception) {
285 $returnValue = array(
287 'message' => $exception->getMessage()
301 public function insertNodeAfterDestination($parentNodeData, $destination, $pageType) {
307 }
catch (\Exception $exception) {
308 $returnValue = array(
310 'message' => $exception->getMessage()
322 static public function getViewLink($nodeData) {
326 preg_match(
'/window\\.open\\(\'([^\']+)\'/i', $javascriptLink, $match);
340 static public function addRootlineOfNodeToStateHash($stateId, $nodeId) {
341 $mountPoints = array_map(
'intval',
$GLOBALS[
'BE_USER']->returnWebmounts());
342 if (count($mountPoints) == 0) {
343 $mountPoints = array(0);
345 if (!empty(
$GLOBALS[
'BE_USER']->uc[
'pageTree_temporaryMountPoint'])){
346 $mountPoints[] = (int)
$GLOBALS[
'BE_USER']->uc[
'pageTree_temporaryMountPoint'];
348 $mountPoints = array_unique($mountPoints);
351 $state = $userSettings->get(
'BackendComponents.States.' . $stateId);
352 $state->stateHash = (object) $state->stateHash;
354 $rootlineIds = array();
355 foreach ($rootline as $pageData) {
356 $rootlineIds[] = (int)$pageData[
'uid'];
358 foreach ($mountPoints as $mountPoint) {
359 if (!in_array($mountPoint, $rootlineIds, TRUE)) {
363 foreach ($rootline as $pageData) {
364 $node = Commands::getNewNode($pageData, $mountPoint);
366 $isFirstNode = FALSE;
367 $state->stateHash->lastSelectedNode = $node->calculateNodeId();
369 $state->stateHash->{$node->calculateNodeId(
'')} = 1;
373 $userSettings->set(
'BackendComponents.States.' . $stateId, $state);
374 return (array) $state->stateHash;
static BEgetRootLine($uid, $clause='', $workspaceOL=FALSE)
static disableNode(\TYPO3\CMS\Backend\Tree\Pagetree\PagetreeNode $node)
static updateNodeLabel(\TYPO3\CMS\Backend\Tree\Pagetree\PagetreeNode $node, $updatedLabel)
static deleteNode(\TYPO3\CMS\Backend\Tree\Pagetree\PagetreeNode $node)
static getNode($nodeId, $unsetMovePointers=TRUE)
static visiblyNode(\TYPO3\CMS\Backend\Tree\Pagetree\PagetreeNode $node)
static makeInstance($className)
static copyNode(\TYPO3\CMS\Backend\Tree\Pagetree\PagetreeNode $sourceNode, $targetId)
static createNode(\TYPO3\CMS\Backend\Tree\Pagetree\PagetreeNode $parentNode, $targetId, $pageType)
static viewOnClick($pageUid, $backPath='', $rootLine='', $anchorSection='', $alternativeUrl='', $additionalGetVars='', $switchFocus=TRUE)
static moveNode(\TYPO3\CMS\Backend\Tree\Pagetree\PagetreeNode $sourceNode, $targetId)
static getMountPointPath($uid=-1)
static getNodeRecord($nodeId, $unsetMovePointers=TRUE)
static fixed_lgd_cs($string, $chars, $appendString='...')
static restoreNode(\TYPO3\CMS\Backend\Tree\Pagetree\PagetreeNode $node, $targetId)
if(!defined('TYPO3_MODE')) $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_userauth.php']['logoff_pre_processing'][]