40 protected function initDataProvider() {
52 $this->initDataProvider();
53 $node = $this->dataProvider->getRoot();
54 return $node->toArray();
65 $this->initDataProvider();
68 if ($nodeId ===
'root') {
69 $nodeCollection = $this->dataProvider->getTreeMounts();
71 $nodeCollection = $this->dataProvider->getNodes($node, $node->getMountPoint());
73 return $nodeCollection->toArray();
84 public function getFilteredTree($nodeId, $nodeData, $searchFilter) {
85 if (strval($searchFilter) ===
'') {
90 $this->initDataProvider();
91 if ($nodeId ===
'root') {
92 $nodeCollection = $this->dataProvider->getTreeMounts($searchFilter);
94 $nodeCollection = $this->dataProvider->getFilteredNodes($node, $searchFilter, $node->getMountPoint());
96 return $nodeCollection->toArray();
108 $doktypeLabelMap = array();
109 foreach (
$GLOBALS[
'TCA'][
'pages'][
'columns'][
'doktype'][
'config'][
'items'] as $doktypeItemConfig) {
110 if ($doktypeItemConfig[1] ===
'--div--') {
113 $doktypeLabelMap[$doktypeItemConfig[1]] = $doktypeItemConfig[0];
118 $isAdmin =
$GLOBALS[
'BE_USER']->isAdmin();
119 foreach ($doktypes as $doktype) {
120 if (!$isAdmin && !in_array($doktype, $allowedDoktypes)) {
123 $label =
$GLOBALS[
'LANG']->sL($doktypeLabelMap[$doktype], TRUE);
126 'nodeType' => $doktype,
127 'cls' =>
'typo3-pagetree-topPanel-button',
128 'iconCls' => $spriteIcon,
141 public function getIndicators() {
144 $indicatorHtmlArr = $indicatorProvider->getAllIndicators();
146 'html' => implode(
' ', $indicatorHtmlArr),
147 '_COUNT' => count($indicatorHtmlArr)
158 $file =
'LLL:EXT:lang/locallang_core.xlf:';
159 $indicators = $this->getIndicators();
160 $configuration = array(
162 'copyHint' =>
$GLOBALS[
'LANG']->sL($file .
'tree.copyHint', TRUE),
163 'fakeNodeHint' =>
$GLOBALS[
'LANG']->sL($file .
'mess.please_wait', TRUE),
164 'activeFilterMode' =>
$GLOBALS[
'LANG']->sL($file .
'tree.activeFilterMode', TRUE),
165 'dropToRemove' =>
$GLOBALS[
'LANG']->sL($file .
'tree.dropToRemove', TRUE),
166 'buttonRefresh' =>
$GLOBALS[
'LANG']->sL($file .
'labels.refresh', TRUE),
167 'buttonNewNode' =>
$GLOBALS[
'LANG']->sL($file .
'tree.buttonNewNode', TRUE),
168 'buttonFilter' =>
$GLOBALS[
'LANG']->sL($file .
'tree.buttonFilter', TRUE),
169 'dropZoneElementRemoved' =>
$GLOBALS[
'LANG']->sL($file .
'tree.dropZoneElementRemoved', TRUE),
170 'dropZoneElementRestored' =>
$GLOBALS[
'LANG']->sL($file .
'tree.dropZoneElementRestored', TRUE),
171 'searchTermInfo' =>
$GLOBALS[
'LANG']->sL($file .
'tree.searchTermInfo', TRUE),
172 'temporaryMountPointIndicatorInfo' =>
$GLOBALS[
'LANG']->sl($file .
'labels.temporaryDBmount', TRUE),
173 'deleteDialogTitle' =>
$GLOBALS[
'LANG']->sL(
'LLL:EXT:cms/layout/locallang.xlf:deleteItem', TRUE),
174 'deleteDialogMessage' =>
$GLOBALS[
'LANG']->sL(
'LLL:EXT:cms/layout/locallang.xlf:deleteWarning', TRUE),
175 'recursiveDeleteDialogMessage' =>
$GLOBALS[
'LANG']->sL(
'LLL:EXT:cms/layout/locallang.xlf:recursiveDeleteWarning', TRUE)
177 'Configuration' => array(
178 'hideFilter' =>
$GLOBALS[
'BE_USER']->getTSConfigVal(
'options.pageTree.hideFilter'),
179 'displayDeleteConfirmation' =>
$GLOBALS[
'BE_USER']->jsConfirmation(4),
180 'canDeleteRecursivly' =>
$GLOBALS[
'BE_USER']->uc[
'recursiveDelete'] == TRUE,
181 'disableIconLinkToContextmenu' =>
$GLOBALS[
'BE_USER']->getTSConfigVal(
'options.pageTree.disableIconLinkToContextmenu'),
182 'indicator' => $indicators[
'html'],
195 return $configuration;
setDataProvider(\TYPO3\CMS\Backend\Tree\AbstractTreeDataProvider $dataProvider)
static makeInstance($className)
static trimExplode($delim, $string, $removeEmptyValues=FALSE, $limit=0)
static getMountPointPath($uid=-1)
getNextTreeLevel($nodeId, $nodeData)
if(!defined('TYPO3_MODE')) $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_userauth.php']['logoff_pre_processing'][]
static getSpriteIconClasses($iconName)