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