TYPO3 CMS  TYPO3_6-2
LocalPageTree.php
Go to the documentation of this file.
1 <?php
2 namespace TYPO3\CMS\Impexp;
3 
23 
27  public function __construct() {
28  $this->init();
29  }
30 
39  public function wrapTitle($title, $v) {
40  $title = trim($title) === '' ? '<em>[' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:labels.no_title', TRUE) . ']</em>' : htmlspecialchars($title);
41  return $title;
42  }
43 
53  public function PM_ATagWrap($icon, $cmd, $bMark = '') {
54  return $icon;
55  }
56 
65  public function wrapIcon($icon, $row) {
66  return $icon;
67  }
68 
75  public function permsC() {
76  return $this->BE_USER->getPagePermsClause(1);
77  }
78 
87  public function ext_tree($pid, $clause = '') {
88  // Initialize:
89  $this->init(' AND ' . $this->permsC() . $clause);
90  // Get stored tree structure:
91  $this->stored = unserialize($this->BE_USER->uc['browseTrees']['browsePages']);
92  // PM action:
94  // traverse mounts:
95  $titleLen = (int)$this->BE_USER->uc['titleLen'];
96  $treeArr = array();
97  $idx = 0;
98  // Set first:
99  $this->bank = $idx;
100  $isOpen = $this->stored[$idx][$pid] || $this->expandFirst;
101  // save ids
102  $curIds = $this->ids;
103  $this->reset();
104  $this->ids = $curIds;
105  // Set PM icon:
106  $cmd = $this->bank . '_' . ($isOpen ? '0_' : '1_') . $pid;
107  $icon = '<img' . \TYPO3\CMS\Backend\Utility\IconUtility::skinImg($this->backPath, ('gfx/ol/' . ($isOpen ? 'minus' : 'plus') . 'only.gif'), 'width="18" height="16"') . ' align="top" alt="" />';
108  $firstHtml = $this->PM_ATagWrap($icon, $cmd);
109  if ($pid > 0) {
111  $firstHtml .= $this->wrapIcon(\TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIconForRecord('pages', $rootRec), $rootRec);
112  } else {
113  $rootRec = array(
114  'title' => $GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename'],
115  'uid' => 0
116  );
117  $firstHtml .= $this->wrapIcon('<img' . \TYPO3\CMS\Backend\Utility\IconUtility::skinImg($this->backPath, 'gfx/i/_icon_website.gif', 'width="18" height="16"') . ' align="top" alt="" />', $rootRec);
118  }
119  $this->tree[] = array('HTML' => $firstHtml, 'row' => $rootRec);
120  if ($isOpen) {
121  // Set depth:
122  $depthD = '<img' . \TYPO3\CMS\Backend\Utility\IconUtility::skinImg($this->backPath, 'gfx/ol/blank.gif', 'width="18" height="16"') . ' align="top" alt="" />';
123  if ($this->addSelfId) {
124  $this->ids[] = $pid;
125  }
126  $this->getTree($pid, 999, $depthD);
127  $idH = array();
128  $idH[$pid]['uid'] = $pid;
129  if (count($this->buffer_idH)) {
130  $idH[$pid]['subrow'] = $this->buffer_idH;
131  }
132  $this->buffer_idH = $idH;
133  }
134  // Add tree:
135  $treeArr = array_merge($treeArr, $this->tree);
136  return $treeArr;
137  }
138 
139 }
static skinImg($backPath, $src, $wHattribs='', $outputMode=0)
static getRecordWSOL($table, $uid, $fields=' *', $where='', $useDeleteClause=TRUE, $unsetMovePointers=FALSE)
static intExplode($delimiter, $string, $removeEmptyValues=FALSE, $limit=0)
init($clause='', $orderByFields='')
getTree($uid, $depth=999, $depthData='', $blankLineCode='', $subCSSclass='')
PM_ATagWrap($icon, $cmd, $bMark='')
if(!defined('TYPO3_MODE')) $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_userauth.php']['logoff_pre_processing'][]