TYPO3 CMS  TYPO3_6-2
ToolbarMenu.php
Go to the documentation of this file.
1 <?php
3 
21 class ToolbarMenu {
22 
27  public function toggleWorkspacePreviewMode($parameter) {
28  $newState = $GLOBALS['BE_USER']->user['workspace_preview'] ? '0' : '1';
29  $GLOBALS['BE_USER']->setWorkspacePreview($newState);
30  return array('newWorkspacePreviewState' => $newState);
31  }
32 
37  public function setWorkspace($parameter) {
38  $workspaceId = (int)$parameter->workSpaceId;
39  $pageId = (int)$parameter->pageId;
40 
41  $GLOBALS['BE_USER']->setWorkspace($workspaceId);
42 
43  while ($pageId) {
45  ' AND pages.t3ver_wsid IN (0, ' . $workspaceId . ')');
46  if ($page) {
47  if ($GLOBALS['BE_USER']->doesUserHaveAccess($page, 1)) {
48  break;
49  }
50  } else {
51  $page = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecord('pages', $pageId);
52  }
53  $pageId = $page['pid'];
54  }
55 
56  return array(
57  'title' => \TYPO3\CMS\Workspaces\Service\WorkspaceService::getWorkspaceTitle($workspaceId),
58  'id' => $workspaceId,
59  'page' => (isset($page['uid']) && ($parameter->pageId == $page['uid'])) ? NULL : (int)$page['uid']
60  );
61  }
62 
63 }
static getRecordWSOL($table, $uid, $fields=' *', $where='', $useDeleteClause=TRUE, $unsetMovePointers=FALSE)
if(!defined('TYPO3_MODE')) $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_userauth.php']['logoff_pre_processing'][]