‪TYPO3CMS  9.5
FolderTreeView.php
Go to the documentation of this file.
1 <?php
3 
4 /*
5  * This file is part of the TYPO3 CMS project.
6  *
7  * It is free software; you can redistribute it and/or modify it under
8  * the terms of the GNU General Public License, either version 2
9  * of the License, or any later version.
10  *
11  * For the full copyright and license information, please read the
12  * LICENSE.txt file that was distributed with this source code.
13  *
14  * The TYPO3 project - inspiring people to share!
15  */
16 
28 
36 {
42  protected ‪$storages;
43 
47  protected ‪$storageHashNumbers;
48 
55  protected ‪$ajaxStatus = false;
56 
60  protected ‪$scope;
61 
65  protected ‪$iconFactory;
66 
71  public ‪$titleAttrib = '';
72 
78  public ‪$treeName = 'folder';
79 
84  public ‪$domIdPrefix = 'folder';
85 
89  public function ‪__construct()
90  {
91  parent::__construct();
92  $this->‪init();
93  $this->storages = $this->BE_USER->getFileStorages();
94  $this->iconFactory = GeneralUtility::makeInstance(IconFactory::class);
95  }
96 
110  public function ‪PMicon($folderObject, $subFolderCounter, $totalSubFolders, $nextCount, $isExpanded)
111  {
112  $icon = '';
113  if ($nextCount) {
114  $cmd = $this->‪generateExpandCollapseParameter($this->bank, !$isExpanded, $folderObject);
115  $icon = $this->‪PMiconATagWrap($icon, $cmd, !$isExpanded);
116  }
117  return $icon;
118  }
119 
129  public function ‪PMiconATagWrap($icon, $cmd, $isExpand = true)
130  {
131  if (empty($this->scope)) {
132  $this->scope = [
133  'class' => static::class,
134  'script' => ‪$this->thisScript,
135  ];
136  }
137 
138  if ($this->thisScript) {
139  // Activates dynamic AJAX based tree
140  $scopeData = json_encode($this->scope);
141  $scopeHash = GeneralUtility::hmac($scopeData);
142  $js = htmlspecialchars('Tree.load(' . GeneralUtility::quoteJSvalue($cmd) . ', ' . (int)$isExpand . ', this, ' . GeneralUtility::quoteJSvalue($scopeData) . ', ' . GeneralUtility::quoteJSvalue($scopeHash) . ');');
143  return '<a class="list-tree-control' . (!$isExpand ? ' list-tree-control-open' : ' list-tree-control-closed') . '" onclick="' . $js . '"><i class="fa"></i></a>';
144  }
145  return $icon;
146  }
147 
153  protected function ‪renderPMIconAndLink($cmd, $isOpen)
154  {
155  $link = $this->thisScript ? ' href="' . htmlspecialchars($this->‪getThisScript() . 'PM=' . $cmd) . '"' : '';
156  return '<a class="list-tree-control list-tree-control-' . ($isOpen ? 'open' : 'closed') . '"' . $link . '><i class="fa"></i></a>';
157  }
158 
168  public function ‪wrapIcon($icon, $folderObject)
169  {
170  // Add title attribute to input icon tag
171  $theFolderIcon = '';
172  // Wrap icon in click-menu link.
173  if (!$this->ext_IconMode) {
174  // Check storage access to wrap with click menu
175  if (!$folderObject instanceof InaccessibleFolder) {
176  $tableName = $this->‪getTableNameForClickMenu($folderObject);
177  $theFolderIcon = ‪BackendUtility::wrapClickMenuOnIcon($icon, $tableName, $folderObject->getCombinedIdentifier(), 'tree');
178  }
179  } elseif ($this->ext_IconMode === 'titlelink') {
180  $aOnClick = 'return jumpTo(' . GeneralUtility::quoteJSvalue($this->‪getJumpToParam($folderObject)) . ',this,' . GeneralUtility::quoteJSvalue($this->domIdPrefix . $this->‪getId($folderObject)) . ',' . $this->bank . ');';
181  $theFolderIcon = '<a href="#" onclick="' . htmlspecialchars($aOnClick) . '">' . $icon . '</a>';
182  }
183  return $theFolderIcon;
184  }
185 
196  public function ‪wrapTitle(‪$title, $folderObject, ‪$bank = 0)
197  {
198  // Check storage access to wrap with click menu
199  if ($folderObject instanceof InaccessibleFolder) {
200  return ‪$title;
201  }
202  $aOnClick = 'return jumpTo(' . GeneralUtility::quoteJSvalue($this->‪getJumpToParam($folderObject)) . ', this, ' . GeneralUtility::quoteJSvalue($this->domIdPrefix . $this->‪getId($folderObject)) . ', ' . ‪$bank . ');';
203  $tableName = $this->‪getTableNameForClickMenu($folderObject);
204  $clickMenuParts = ‪BackendUtility::wrapClickMenuOnIcon('', $tableName, $folderObject->getCombinedIdentifier(), 'tree', '', '', true);
205 
206  return '<a href="#" title="' . htmlspecialchars(strip_tags(‪$title)) . '" onclick="' . htmlspecialchars($aOnClick) . '" ' . GeneralUtility::implodeAttributes($clickMenuParts) . '>' . ‪$title . '</a>';
207  }
208 
216  public function ‪getId($folderObject)
217  {
218  return GeneralUtility::md5int($folderObject->getCombinedIdentifier());
219  }
220 
228  public function ‪getJumpToParam($folderObject)
229  {
230  return rawurlencode($folderObject->getCombinedIdentifier());
231  }
232 
241  public function ‪getTitleStr($row, $titleLen = 30)
242  {
243  return $row['_title'] ?? parent::getTitleStr($row, $titleLen);
244  }
245 
253  public function ‪getTitleAttrib($folderObject)
254  {
255  return htmlspecialchars($folderObject->getName());
256  }
257 
264  public function ‪getBrowsableTree()
265  {
266  // Get stored tree structure AND updating it if needed according to incoming PM GET var.
268  // Init done:
269  $treeItems = [];
270  // Traverse mounts:
271  foreach ($this->storages as $storageObject) {
272  $this->‪getBrowseableTreeForStorage($storageObject);
273  // Add tree:
274  $treeItems = array_merge($treeItems, $this->tree);
275  }
276  return $this->‪printTree($treeItems);
277  }
278 
284  public function ‪getBrowseableTreeForStorage(‪ResourceStorage $storageObject)
285  {
286  // If there are filemounts, show each, otherwise just the rootlevel folder
287  $fileMounts = $storageObject->‪getFileMounts();
288  $rootLevelFolders = [];
289  if (!empty($fileMounts)) {
290  foreach ($fileMounts as $fileMountInfo) {
291  $rootLevelFolders[] = [
292  'folder' => $fileMountInfo['folder'],
293  'name' => $fileMountInfo['title']
294  ];
295  }
296  } elseif ($this->BE_USER->isAdmin()) {
297  $rootLevelFolders[] = [
298  'folder' => $storageObject->‪getRootLevelFolder(),
299  'name' => $storageObject->‪getName()
300  ];
301  }
302  // Clean the tree
303  $this->‪reset();
304  // Go through all "root level folders" of this tree (can be the rootlevel folder or any file mount points)
305  foreach ($rootLevelFolders as $rootLevelFolderInfo) {
307  $rootLevelFolder = $rootLevelFolderInfo['folder'];
308  $rootLevelFolderName = $rootLevelFolderInfo['name'];
309  $folderHashSpecUID = GeneralUtility::md5int($rootLevelFolder->getCombinedIdentifier());
310  $this->specUIDmap[$folderHashSpecUID] = $rootLevelFolder->getCombinedIdentifier();
311  // Hash key
312  $storageHashNumber = $this->‪getShortHashNumberForStorage($storageObject, $rootLevelFolder);
313  // Set first:
314  $this->bank = $storageHashNumber;
315  $isOpen = $this->stored[$storageHashNumber][$folderHashSpecUID] || ‪$this->expandFirst;
316  // Set PM icon:
317  $cmd = $this->‪generateExpandCollapseParameter($this->bank, !$isOpen, $rootLevelFolder);
318  // Only show and link icon if storage is browseable
319  if (!$storageObject->‪isBrowsable() || $this->getNumberOfSubfolders($rootLevelFolder) === 0) {
320  $firstHtml = '';
321  } else {
322  $firstHtml = $this->‪renderPMIconAndLink($cmd, $isOpen);
323  }
324  // Mark a storage which is not online, as offline
325  // maybe someday there will be a special icon for this
326  if ($storageObject->‪isOnline() === false) {
327  $rootLevelFolderName .= ' (' . $this->‪getLanguageService()->‪sL('LLL:EXT:core/Resources/Private/Language/locallang_mod_file.xlf:sys_file_storage.isOffline') . ')';
328  }
329  // Preparing rootRec for the mount
330  $icon = $this->iconFactory->getIconForResource($rootLevelFolder, ‪Icon::SIZE_SMALL, null, ['mount-root' => true]);
331  $firstHtml .= $this->‪wrapIcon($icon, $rootLevelFolder);
332  $row = [
333  'uid' => $folderHashSpecUID,
334  'title' => $rootLevelFolderName,
335  'path' => $rootLevelFolder->getCombinedIdentifier(),
336  'folder' => $rootLevelFolder
337  ];
338  // Add the storage root to ->tree
339  $this->tree[] = [
340  'HTML' => $firstHtml,
341  'row' => $row,
342  'bank' => ‪$this->bank,
343  // hasSub is TRUE when the root of the storage is expanded
344  'hasSub' => $isOpen && $storageObject->‪isBrowsable(),
345  'invertedDepth' => 1000,
346  ];
347  // If the mount is expanded, go down:
348  if ($isOpen && $storageObject->‪isBrowsable()) {
349  // Set depth:
350  $this->‪getFolderTree($rootLevelFolder, 999);
351  }
352  }
353  }
354 
365  public function ‪getFolderTree(Folder $folderObject, $depth = 999, $type = '')
366  {
367  $depth = (int)$depth;
368 
369  // This generates the directory tree
370  /* array of \TYPO3\CMS\Core\Resource\Folder */
371  if ($folderObject instanceof InaccessibleFolder) {
372  $subFolders = [];
373  } else {
374  $subFolders = $folderObject->getSubfolders();
376  uksort($subFolders, 'strnatcasecmp');
377  }
378 
379  $totalSubFolders = count($subFolders);
380  $HTML = '';
381  $subFolderCounter = 0;
382  $treeKey = '';
384  foreach ($subFolders as $subFolderName => $subFolder) {
385  $subFolderCounter++;
386  // Reserve space.
387  $this->tree[] = [];
388  // Get the key for this space
389  end($this->tree);
390  $isLocked = $subFolder instanceof InaccessibleFolder;
391  $treeKey = key($this->tree);
392  $specUID = GeneralUtility::md5int($subFolder->getCombinedIdentifier());
393  $this->specUIDmap[$specUID] = $subFolder->getCombinedIdentifier();
394  $row = [
395  'uid' => $specUID,
396  'path' => $subFolder->getCombinedIdentifier(),
397  'title' => $subFolderName,
398  'folder' => $subFolder
399  ];
400  // Make a recursive call to the next level
401  if (!$isLocked && $depth > 1 && $this->‪expandNext($specUID)) {
402  $nextCount = $this->‪getFolderTree($subFolder, $depth - 1, $type);
403  // Set "did expand" flag
404  $isOpen = 1;
405  } else {
406  $nextCount = $isLocked ? 0 : $this->‪getNumberOfSubfolders($subFolder);
407  // Clear "did expand" flag
408  $isOpen = 0;
409  }
410  // Set HTML-icons, if any:
411  if ($this->makeHTML) {
412  $HTML = $this->‪PMicon($subFolder, $subFolderCounter, $totalSubFolders, $nextCount, $isOpen);
413  $type = '';
414 
415  $role = $subFolder->getRole();
416  if ($role !== ‪FolderInterface::ROLE_DEFAULT) {
417  $row['_title'] = '<strong>' . $subFolderName . '</strong>';
418  }
419  $icon = '<span title="' . htmlspecialchars($subFolderName) . '">'
420  . $this->iconFactory->getIconForResource($subFolder, ‪Icon::SIZE_SMALL, null, ['folder-open' => (bool)$isOpen])
421  . '</span>';
422  $HTML .= $this->‪wrapIcon($icon, $subFolder);
423  }
424  // Finally, add the row/HTML content to the ->tree array in the reserved key.
425  $this->tree[$treeKey] = [
426  'row' => $row,
427  'HTML' => $HTML,
428  'hasSub' => $nextCount && $this->‪expandNext($specUID),
429  'isFirst' => $subFolderCounter == 1,
430  'isLast' => false,
431  'invertedDepth' => $depth,
432  'bank' => ‪$this->bank
433  ];
434  }
435  if ($subFolderCounter > 0) {
436  $this->tree[$treeKey]['isLast'] = true;
437  }
438  return $totalSubFolders;
439  }
440 
447  public function ‪printTree($treeItems = '')
448  {
449  $doExpand = false;
450  $doCollapse = false;
451  $ajaxOutput = '';
452  $titleLength = (int)$this->BE_USER->uc['titleLen'];
453  if (!is_array($treeItems)) {
454  $treeItems = ‪$this->tree;
455  }
456 
457  if (empty($treeItems)) {
458  $message = GeneralUtility::makeInstance(
459  FlashMessage::class,
460  $this->‪getLanguageService()->sL('LLL:EXT:backend/Resources/Private/Language/locallang.xlf:foldertreeview.noFolders.message'),
461  $this->‪getLanguageService()->sL('LLL:EXT:backend/Resources/Private/Language/locallang.xlf:foldertreeview.noFolders.title'),
463  );
465  $flashMessageService = GeneralUtility::makeInstance(FlashMessageService::class);
467  $defaultFlashMessageQueue = $flashMessageService->getMessageQueueByIdentifier();
468  $defaultFlashMessageQueue->enqueue($message);
469  return $defaultFlashMessageQueue->renderFlashMessages();
470  }
471 
472  $expandedFolderHash = '';
473  $invertedDepthOfAjaxRequestedItem = 0;
474  $out = '<ul class="list-tree list-tree-root">';
475  // Evaluate AJAX request
476  if (TYPO3_REQUESTTYPE & TYPO3_REQUESTTYPE_AJAX) {
477  list(, $expandCollapseCommand, $expandedFolderHash, ) = $this->‪evaluateExpandCollapseParameter();
478  if ($expandCollapseCommand == 1) {
479  $doExpand = true;
480  } else {
481  $doCollapse = true;
482  }
483  }
484  // We need to count the opened <ul>'s every time we dig into another level,
485  // so we know how many we have to close when all children are done rendering
486  $closeDepth = [];
487  foreach ($treeItems as $treeItem) {
489  $folderObject = $treeItem['row']['folder'];
490  $classAttr = $treeItem['row']['_CSSCLASS'] ?? '';
491  $folderIdentifier = $folderObject->getCombinedIdentifier();
492  // this is set if the AJAX request has just opened this folder (via the PM command)
493  $isExpandedFolderIdentifier = $expandedFolderHash == GeneralUtility::md5int($folderIdentifier);
494  $idAttr = htmlspecialchars($this->domIdPrefix . $this->‪getId($folderObject) . '_' . $treeItem['bank']);
495  $itemHTML = '';
496  // If this item is the start of a new level,
497  // then a new level <ul> is needed, but not in ajax mode
498  if (!empty($treeItem['isFirst']) && !$doCollapse && !($doExpand && $isExpandedFolderIdentifier)) {
499  $itemHTML = '<ul class="list-tree">';
500  }
501  // Add CSS classes to the list item
502  if (!empty($treeItem['hasSub'])) {
503  $classAttr .= ' list-tree-control-open';
504  }
505  $itemHTML .= '
506  <li id="' . $idAttr . '" ' . ($classAttr ? ' class="' . trim($classAttr) . '"' : '') . '><span class="list-tree-group">' . $treeItem['HTML'] . $this->‪wrapTitle($this->‪getTitleStr($treeItem['row'], $titleLength), $folderObject, $treeItem['bank']) . '</span>';
507  if (empty($treeItem['hasSub'])) {
508  $itemHTML .= '</li>';
509  }
510  // We have to remember if this is the last one
511  // on level X so the last child on level X+1 closes the <ul>-tag
512  if (!empty($treeItem['isLast']) && !($doExpand && $isExpandedFolderIdentifier)) {
513  $closeDepth[$treeItem['invertedDepth']] = 1;
514  }
515  // If this is the last one and does not have subitems, we need to close
516  // the tree as long as the upper levels have last items too
517  if (!empty($treeItem['isLast']) && empty($treeItem['hasSub']) && !$doCollapse && !($doExpand && $isExpandedFolderIdentifier)) {
518  for ($i = $treeItem['invertedDepth']; !empty($closeDepth[$i]); $i++) {
519  $closeDepth[$i] = 0;
520  $itemHTML .= '</ul></li>';
521  }
522  }
523  // Ajax request: collapse
524  if ($doCollapse && $isExpandedFolderIdentifier) {
525  $this->ajaxStatus = true;
526  return $itemHTML;
527  }
528  // Ajax request: expand
529  if ($doExpand && $isExpandedFolderIdentifier) {
530  $ajaxOutput .= $itemHTML;
531  $invertedDepthOfAjaxRequestedItem = $treeItem['invertedDepth'];
532  } elseif ($invertedDepthOfAjaxRequestedItem) {
533  if ($treeItem['invertedDepth'] && ($treeItem['invertedDepth'] < $invertedDepthOfAjaxRequestedItem)) {
534  $ajaxOutput .= $itemHTML;
535  } else {
536  $this->ajaxStatus = true;
537  return $ajaxOutput;
538  }
539  }
540  $out .= $itemHTML;
541  }
542  // If this is an AJAX request, output directly
543  if ($ajaxOutput) {
544  $this->ajaxStatus = true;
545  return $ajaxOutput;
546  }
547  // Finally close the first ul
548  $out .= '</ul>';
549  return $out;
550  }
551 
558  protected function ‪getTableNameForClickMenu(‪Folder $folderObject)
559  {
560  if (strpos($folderObject->‪getRole(), ‪FolderInterface::ROLE_MOUNT) !== false) {
561  $tableName = 'sys_filemounts';
562  } elseif ($folderObject->‪getIdentifier() === $folderObject->‪getStorage()->‪getRootLevelFolder()->‪getIdentifier()) {
563  $tableName = 'sys_file_storage';
564  } else {
565  $tableName = 'sys_file';
566  }
567  return $tableName;
568  }
569 
577  public function ‪getNumberOfSubfolders(‪Folder $folderObject)
578  {
579  $subFolders = $folderObject->‪getSubfolders();
580  return count($subFolders);
581  }
582 
588  public function ‪initializePositionSaving()
589  {
590  // Get stored tree structure:
591  $this->stored = unserialize($this->BE_USER->uc['browseTrees'][$this->treeName], ['allowed_classes' => false]);
593  // PM action:
594  // (If an plus/minus icon has been clicked,
595  // the PM GET var is sent and we must update the stored positions in the tree):
596  // 0: mount key, 1: set/clear boolean, 2: item ID (cannot contain "_"), 3: treeName
597  list($storageHashNumber, $doExpand, $numericFolderHash, ‪$treeName) = $this->‪evaluateExpandCollapseParameter();
598  if (‪$treeName && ‪$treeName == $this->treeName) {
599  if (in_array($storageHashNumber, $this->storageHashNumbers)) {
600  if ($doExpand == 1) {
601  // Set
602  $this->stored[$storageHashNumber][$numericFolderHash] = 1;
603  } else {
604  // Clear
605  unset($this->stored[$storageHashNumber][$numericFolderHash]);
606  }
607  $this->‪savePosition();
608  }
609  }
610  }
611 
620  protected function ‪getShortHashNumberForStorage(ResourceStorage $storageObject = null, Folder $startingPointFolder = null)
621  {
622  if (!$this->storageHashNumbers) {
623  $this->storageHashNumbers = [];
624  foreach ($this->storages as $storageUid => $storage) {
625  $fileMounts = $storage->getFileMounts();
626  if (!empty($fileMounts)) {
627  foreach ($fileMounts as $fileMount) {
628  $nkey = hexdec(substr(GeneralUtility::md5int($fileMount['folder']->getCombinedIdentifier()), 0, 4));
629  $this->storageHashNumbers[$storageUid . $fileMount['folder']->getCombinedIdentifier()] = $nkey;
630  }
631  } else {
632  $folder = $storage->getRootLevelFolder();
633  $nkey = hexdec(substr(GeneralUtility::md5int($folder->getCombinedIdentifier()), 0, 4));
634  $this->storageHashNumbers[$storageUid . $folder->getCombinedIdentifier()] = $nkey;
635  }
636  }
637  }
638  if ($storageObject) {
639  if ($startingPointFolder) {
640  return $this->storageHashNumbers[$storageObject->‪getUid() . $startingPointFolder->getCombinedIdentifier()];
641  }
642  return $this->storageHashNumbers[$storageObject->‪getUid()];
643  }
644  return null;
645  }
646 
658  protected function ‪evaluateExpandCollapseParameter($PM = null)
659  {
660  if ($PM === null) {
661  $PM = GeneralUtility::_GP('PM');
662  // IE takes anchor as parameter
663  if (($PMpos = strpos($PM, '#')) !== false) {
664  $PM = substr($PM, 0, $PMpos);
665  }
666  }
667  // Take the first three parameters
668  list($mountKey, $doExpand, $folderIdentifier) = array_pad(explode('_', $PM, 3), 3, null);
669  // In case the folder identifier contains "_", we just need to get the fourth/last parameter
670  list($folderIdentifier, ‪$treeName) = array_pad(GeneralUtility::revExplode('_', $folderIdentifier, 2), 2, null);
671  return [
672  $mountKey,
673  $doExpand,
674  $folderIdentifier,
676  ];
677  }
678 
689  protected function ‪generateExpandCollapseParameter($mountKey = null, $doExpand = false, Folder $folderObject = null, ‪$treeName = null)
690  {
691  $parts = [
692  $mountKey ?? ‪$this->bank,
693  $doExpand == 1 ? 1 : 0,
694  $folderObject !== null ? GeneralUtility::md5int($folderObject->getCombinedIdentifier()) : '',
695  ‪$treeName ?? $this->treeName
696  ];
697  return implode('_', $parts);
698  }
699 
705  public function ‪getAjaxStatus()
706  {
707  return ‪$this->ajaxStatus;
708  }
709 
713  protected function ‪getLanguageService()
714  {
715  return ‪$GLOBALS['LANG'];
716  }
717 }
‪TYPO3\CMS\Backend\Tree\View\FolderTreeView\$scope
‪array $scope
Definition: FolderTreeView.php:56
‪TYPO3\CMS\Core\Imaging\Icon\SIZE_SMALL
‪const SIZE_SMALL
Definition: Icon.php:29
‪TYPO3\CMS\Backend\Tree\View\FolderTreeView\getLanguageService
‪LanguageService getLanguageService()
Definition: FolderTreeView.php:705
‪TYPO3\CMS\Backend\Tree\View\FolderTreeView\getShortHashNumberForStorage
‪int getShortHashNumberForStorage(ResourceStorage $storageObject=null, Folder $startingPointFolder=null)
Definition: FolderTreeView.php:612
‪TYPO3\CMS\Core\Resource\ResourceStorage\getUid
‪int getUid()
Definition: ResourceStorage.php:271
‪TYPO3\CMS\Backend\Tree\View\FolderTreeView\renderPMIconAndLink
‪string renderPMIconAndLink($cmd, $isOpen)
Definition: FolderTreeView.php:145
‪TYPO3\CMS\Backend\Tree\View\FolderTreeView\$ajaxStatus
‪bool $ajaxStatus
Definition: FolderTreeView.php:52
‪TYPO3\CMS\Backend\Tree\View\FolderTreeView\$domIdPrefix
‪string $domIdPrefix
Definition: FolderTreeView.php:76
‪TYPO3\CMS\Backend\Tree\View\FolderTreeView\getJumpToParam
‪string getJumpToParam($folderObject)
Definition: FolderTreeView.php:220
‪TYPO3\CMS\Core\Imaging\Icon
Definition: Icon.php:25
‪TYPO3\CMS\Core\Resource\FolderInterface\ROLE_DEFAULT
‪const ROLE_DEFAULT
Definition: FolderInterface.php:25
‪TYPO3\CMS\Backend\Tree\View\FolderTreeView\getNumberOfSubfolders
‪int getNumberOfSubfolders(Folder $folderObject)
Definition: FolderTreeView.php:569
‪TYPO3\CMS\Backend\Tree\View\AbstractTreeView\$title
‪string $title
Definition: AbstractTreeView.php:73
‪TYPO3\CMS\Backend\Tree\View\AbstractTreeView\init
‪init($clause='', $orderByFields='')
Definition: AbstractTreeView.php:287
‪TYPO3\CMS\Backend\Tree\View\FolderTreeView\wrapIcon
‪string wrapIcon($icon, $folderObject)
Definition: FolderTreeView.php:160
‪TYPO3\CMS\Backend\Tree\View\FolderTreeView\printTree
‪string printTree($treeItems='')
Definition: FolderTreeView.php:439
‪TYPO3\CMS\Backend\Tree\View\FolderTreeView\getTitleAttrib
‪string getTitleAttrib($folderObject)
Definition: FolderTreeView.php:245
‪TYPO3\CMS\Backend\Tree\View\FolderTreeView\getTitleStr
‪string getTitleStr($row, $titleLen=30)
Definition: FolderTreeView.php:233
‪TYPO3\CMS\Backend\Tree\View\FolderTreeView\PMiconATagWrap
‪string PMiconATagWrap($icon, $cmd, $isExpand=true)
Definition: FolderTreeView.php:121
‪TYPO3\CMS\Backend\Tree\View\FolderTreeView\getBrowsableTree
‪string getBrowsableTree()
Definition: FolderTreeView.php:256
‪TYPO3\CMS\Core\Resource\Folder\getRole
‪int getRole()
Definition: Folder.php:519
‪TYPO3\CMS\Backend\Tree\View\FolderTreeView\getFolderTree
‪int getFolderTree(Folder $folderObject, $depth=999, $type='')
Definition: FolderTreeView.php:357
‪TYPO3\CMS\Backend\Tree\View\AbstractTreeView\$expandFirst
‪bool $expandFirst
Definition: AbstractTreeView.php:38
‪TYPO3\CMS\Core\Imaging\IconFactory
Definition: IconFactory.php:31
‪TYPO3\CMS\Core\Localization\LanguageService\sL
‪string sL($input)
Definition: LanguageService.php:158
‪TYPO3\CMS\Backend\Tree\View\AbstractTreeView\savePosition
‪savePosition()
Definition: AbstractTreeView.php:620
‪TYPO3\CMS\Backend\Tree\View\AbstractTreeView\expandNext
‪bool expandNext($id)
Definition: AbstractTreeView.php:581
‪TYPO3\CMS\Core\Resource\ResourceStorage\getRootLevelFolder
‪Folder getRootLevelFolder($respectFileMounts=true)
Definition: ResourceStorage.php:2536
‪TYPO3\CMS\Backend\Tree\View\FolderTreeView\$titleAttrib
‪string $titleAttrib
Definition: FolderTreeView.php:65
‪TYPO3\CMS\Backend\Tree\View\FolderTreeView\__construct
‪__construct()
Definition: FolderTreeView.php:81
‪TYPO3\CMS\Backend\Tree\View\AbstractTreeView\reset
‪reset()
Definition: AbstractTreeView.php:327
‪TYPO3\CMS\Backend\Utility\BackendUtility\wrapClickMenuOnIcon
‪static string wrapClickMenuOnIcon( $content, $table, $uid=0, $context='', $_addParams='', $_enDisItems='', $returnTagParameters=false)
Definition: BackendUtility.php:2759
‪TYPO3\CMS\Core\Resource\Folder\getStorage
‪ResourceStorage getStorage()
Definition: Folder.php:146
‪TYPO3\CMS\Backend\Tree\View\AbstractTreeView\$tree
‪array $tree
Definition: AbstractTreeView.php:230
‪TYPO3\CMS\Backend\Tree\View\FolderTreeView\evaluateExpandCollapseParameter
‪array evaluateExpandCollapseParameter($PM=null)
Definition: FolderTreeView.php:650
‪TYPO3\CMS\Backend\Tree\View\FolderTreeView\$iconFactory
‪IconFactory $iconFactory
Definition: FolderTreeView.php:60
‪TYPO3\CMS\Core\Resource\ResourceStorage\isOnline
‪bool isOnline()
Definition: ResourceStorage.php:395
‪TYPO3\CMS\Core\Resource\InaccessibleFolder
Definition: InaccessibleFolder.php:26
‪TYPO3\CMS\Backend\Tree\View\FolderTreeView\generateExpandCollapseParameter
‪string generateExpandCollapseParameter($mountKey=null, $doExpand=false, Folder $folderObject=null, $treeName=null)
Definition: FolderTreeView.php:681
‪TYPO3\CMS\Backend\Tree\View\FolderTreeView\getTableNameForClickMenu
‪string getTableNameForClickMenu(Folder $folderObject)
Definition: FolderTreeView.php:550
‪TYPO3\CMS\Backend\Tree\View\FolderTreeView\getId
‪int getId($folderObject)
Definition: FolderTreeView.php:208
‪TYPO3\CMS\Core\Resource\Folder\getSubfolders
‪Folder[] getSubfolders($start=0, $numberOfItems=0, $filterMode=self::FILTER_MODE_USE_OWN_AND_STORAGE_FILTERS, $recursive=false)
Definition: Folder.php:287
‪TYPO3\CMS\Core\Resource\ResourceStorage\isBrowsable
‪bool isBrowsable()
Definition: ResourceStorage.php:340
‪TYPO3\CMS\Core\Resource\Folder
Definition: Folder.php:34
‪TYPO3\CMS\Backend\Tree\View\FolderTreeView\$storageHashNumbers
‪array $storageHashNumbers
Definition: FolderTreeView.php:45
‪TYPO3\CMS\Backend\Tree\View\AbstractTreeView\$bank
‪int $bank
Definition: AbstractTreeView.php:240
‪TYPO3\CMS\Core\Resource\ResourceStorage\getFileMounts
‪array getFileMounts()
Definition: ResourceStorage.php:523
‪TYPO3\CMS\Backend\Tree\View\FolderTreeView
Definition: FolderTreeView.php:36
‪TYPO3\CMS\Backend\Tree\View
Definition: AbstractTreeView.php:2
‪TYPO3\CMS\Core\Resource\FolderInterface\ROLE_MOUNT
‪const ROLE_MOUNT
Definition: FolderInterface.php:30
‪TYPO3\CMS\Backend\Utility\BackendUtility
Definition: BackendUtility.php:72
‪TYPO3\CMS\Backend\Tree\View\FolderTreeView\wrapTitle
‪string wrapTitle($title, $folderObject, $bank=0)
Definition: FolderTreeView.php:188
‪TYPO3\CMS\Backend\Tree\View\FolderTreeView\$treeName
‪string $treeName
Definition: FolderTreeView.php:71
‪TYPO3\CMS\Core\Messaging\AbstractMessage\INFO
‪const INFO
Definition: AbstractMessage.php:26
‪TYPO3\CMS\Core\Resource\ResourceStorage
Definition: ResourceStorage.php:74
‪TYPO3\CMS\Core\Messaging\FlashMessage
Definition: FlashMessage.php:22
‪TYPO3\CMS\Backend\Tree\View\FolderTreeView\getBrowseableTreeForStorage
‪getBrowseableTreeForStorage(ResourceStorage $storageObject)
Definition: FolderTreeView.php:276
‪$GLOBALS
‪$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['adminpanel']['modules']
Definition: ext_localconf.php:5
‪TYPO3\CMS\Core\Resource\FolderInterface
Definition: FolderInterface.php:21
‪TYPO3\CMS\Core\Resource\Folder\getIdentifier
‪string getIdentifier()
Definition: Folder.php:157
‪TYPO3\CMS\Backend\Tree\View\AbstractTreeView\getThisScript
‪string getThisScript()
Definition: AbstractTreeView.php:276
‪TYPO3\CMS\Core\Localization\LanguageService
Definition: LanguageService.php:29
‪TYPO3\CMS\Core\Utility\GeneralUtility
Definition: GeneralUtility.php:45
‪TYPO3\CMS\Backend\Tree\View\FolderTreeView\$storages
‪ResourceStorage[] $storages
Definition: FolderTreeView.php:41
‪TYPO3\CMS\Core\Resource\Utility\ListUtility\resolveSpecialFolderNames
‪static array resolveSpecialFolderNames(array $folders)
Definition: ListUtility.php:31
‪TYPO3\CMS\Backend\Tree\View\AbstractTreeView
Definition: AbstractTreeView.php:33
‪TYPO3\CMS\Backend\Tree\View\FolderTreeView\getAjaxStatus
‪bool getAjaxStatus()
Definition: FolderTreeView.php:697
‪TYPO3\CMS\Core\Messaging\FlashMessageService
Definition: FlashMessageService.php:25
‪TYPO3\CMS\Backend\Tree\View\FolderTreeView\initializePositionSaving
‪initializePositionSaving()
Definition: FolderTreeView.php:580
‪TYPO3\CMS\Backend\Tree\View\FolderTreeView\PMicon
‪string PMicon($folderObject, $subFolderCounter, $totalSubFolders, $nextCount, $isExpanded)
Definition: FolderTreeView.php:102
‪TYPO3\CMS\Core\Resource\ResourceStorage\getName
‪string getName()
Definition: ResourceStorage.php:261
‪TYPO3\CMS\Backend\Tree\View\AbstractTreeView\$thisScript
‪string $thisScript
Definition: AbstractTreeView.php:48