‪TYPO3CMS  9.5
FileList.php
Go to the documentation of this file.
1 <?php
2 namespace ‪TYPO3\CMS\Filelist;
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 
41 
47 {
53  public ‪$iLimit = 40;
54 
60  public ‪$thumbs = false;
61 
67  public ‪$spaceIcon;
68 
74  public ‪$fixedL = 30;
75 
81  public ‪$sort = '';
82 
88  public ‪$sortRev = 1;
89 
93  public ‪$firstElementNumber = 0;
94 
98  public ‪$clipBoard = 0;
99 
103  public ‪$bigControlPanel = 0;
104 
108  public ‪$JScode = '';
109 
115  public ‪$HTMLcode = '';
116 
120  public ‪$totalbytes = 0;
121 
125  public ‪$dirs = [];
126 
130  public ‪$files = [];
131 
135  public ‪$path = '';
136 
142  public ‪$leftMargin = 0;
143 
149  public ‪$totalItems = '';
150 
156  public ‪$fieldArray = [];
157 
163  public ‪$setLMargin = 1;
164 
170  public ‪$pageOverlays = [];
171 
177  public ‪$counter = 0;
178 
185 
191  public ‪$thisScript = '';
192 
199 
205  public ‪$eCounter = 0;
206 
210  public ‪$translateTools;
211 
217  public ‪$addElement_tdParams = [];
218 
222  public ‪$no_noWrap = 0;
223 
227  public ‪$showIcon = 1;
228 
234  public ‪$addElement_tdCssClass = [];
235 
239  protected ‪$folderObject;
240 
244  public ‪$CBnames = [];
245 
249  public ‪$clipObj;
250 
254  protected ‪$resourceFactory;
255 
259  protected ‪$iconFactory;
260 
264  protected ‪$id = 0;
265 
270  protected ‪$fileListController;
271 
275  protected ‪$thumbnailConfiguration;
276 
283  {
284  $backendUser = $this->‪getBackendUser();
285  if (isset($backendUser->uc['titleLen']) && $backendUser->uc['titleLen'] > 0) {
286  $this->fixedL = $backendUser->uc['titleLen'];
287  }
288  $this->iconFactory = GeneralUtility::makeInstance(IconFactory::class);
289  $this->‪getTranslateTools();
290  $this->‪determineScriptUrl();
291  $this->fileListController = ‪$fileListController;
292  $this->thumbnailConfiguration = GeneralUtility::makeInstance(ThumbnailConfiguration::class);
293  $this->iLimit = ‪MathUtility::forceIntegerInRange(
294  $backendUser->getTSConfig()['options.']['file_list.']['filesPerPage'] ?? $this->iLimit,
295  1
296  );
297  }
298 
303  {
304  $this->resourceFactory = ‪$resourceFactory;
305  }
306 
317  public function ‪start(Folder ‪$folderObject, $pointer, ‪$sort, ‪$sortRev, ‪$clipBoard = false, ‪$bigControlPanel = false)
318  {
319  $this->folderObject = ‪$folderObject;
320  $this->counter = 0;
321  $this->totalbytes = 0;
322  $this->JScode = '';
323  $this->HTMLcode = '';
324  $this->path = ‪$folderObject->‪getReadablePath();
325  $this->sort = ‪$sort;
326  $this->sortRev = ‪$sortRev;
327  $this->firstElementNumber = $pointer;
328  $this->clipBoard = ‪$clipBoard;
329  $this->bigControlPanel = ‪$bigControlPanel;
330  // Setting the maximum length of the filenames to the user's settings or minimum 30 (= $this->fixedL)
331  $this->fixedL = max($this->fixedL, $this->‪getBackendUser()->uc['titleLen']);
332  $this->‪getLanguageService()->‪includeLLFile('EXT:core/Resources/Private/Language/locallang_common.xlf');
333  $this->resourceFactory = ‪ResourceFactory::getInstance();
334  }
335 
339  public function ‪generateList()
340  {
341  $this->HTMLcode .= $this->‪getTable('fileext,tstamp,size,rw,_REF_');
342  }
343 
353  public function ‪linkClipboardHeaderIcon($string, $_, $cmd, $warning = '')
354  {
355  $jsCode = 'document.dblistForm.cmd.value=' . GeneralUtility::quoteJSvalue($cmd)
356  . ';document.dblistForm.submit();';
357 
358  $attributes = [];
359  if ($warning) {
360  $attributes['class'] = 'btn btn-default t3js-modal-trigger';
361  $attributes['data-href'] = 'javascript:' . $jsCode;
362  $attributes['data-severity'] = 'warning';
363  $attributes['data-content'] = $warning;
364  } else {
365  $attributes['class'] = 'btn btn-default';
366  $attributes['onclick'] = $jsCode . 'return false;';
367  }
368 
369  $attributesString = '';
370  foreach ($attributes as $key => $value) {
371  $attributesString .= ' ' . $key . '="' . htmlspecialchars($value) . '"';
372  }
373  return '<a href="#" ' . $attributesString . '>' . $string . '</a>';
374  }
375 
382  public function ‪getTable($rowlist)
383  {
384  // prepare space icon
385  $this->spaceIcon = '<span class="btn btn-default disabled">' . $this->iconFactory->getIcon('empty-empty', ‪Icon::SIZE_SMALL)->render() . '</span>';
386 
387  // @todo use folder methods directly when they support filters
388  $storage = $this->folderObject->getStorage();
389  $storage->resetFileAndFolderNameFiltersToDefault();
390 
391  // Only render the contents of a browsable storage
392  if ($this->folderObject->getStorage()->isBrowsable()) {
393  try {
394  $foldersCount = $storage->countFoldersInFolder($this->folderObject);
395  $filesCount = $storage->countFilesInFolder($this->folderObject);
396  } catch (InsufficientFolderAccessPermissionsException $e) {
397  $foldersCount = 0;
398  $filesCount = 0;
399  }
400 
401  if ($foldersCount <= $this->firstElementNumber) {
402  $foldersFrom = false;
403  $foldersNum = false;
404  } else {
405  $foldersFrom = ‪$this->firstElementNumber;
406  if ($this->firstElementNumber + $this->iLimit > $foldersCount) {
407  $foldersNum = $foldersCount - ‪$this->firstElementNumber;
408  } else {
409  $foldersNum = ‪$this->iLimit;
410  }
411  }
412  if ($foldersCount >= $this->firstElementNumber + $this->iLimit) {
413  $filesFrom = false;
414  $filesNum = false;
415  } else {
416  if ($this->firstElementNumber <= $foldersCount) {
417  $filesFrom = 0;
418  $filesNum = $this->iLimit - $foldersNum;
419  } else {
420  $filesFrom = $this->firstElementNumber - $foldersCount;
421  if ($filesFrom + $this->iLimit > $filesCount) {
422  $filesNum = $filesCount - $filesFrom;
423  } else {
424  $filesNum = ‪$this->iLimit;
425  }
426  }
427  }
428 
429  $folders = $storage->getFoldersInFolder($this->folderObject, $foldersFrom, $foldersNum, true, false, trim($this->sort), (bool)$this->sortRev);
430  ‪$files = $this->folderObject->getFiles($filesFrom, $filesNum, ‪Folder::FILTER_MODE_USE_OWN_AND_STORAGE_FILTERS, false, trim($this->sort), (bool)$this->sortRev);
431  $this->totalItems = $foldersCount + $filesCount;
432  // Adds the code of files/dirs
433  $out = '';
434  $titleCol = 'file';
435  // Cleaning rowlist for duplicates and place the $titleCol as the first column always!
436  $rowlist = '_LOCALIZATION_,' . $rowlist;
437  $rowlist = GeneralUtility::rmFromList($titleCol, $rowlist);
438  $rowlist = GeneralUtility::uniqueList($rowlist);
439  $rowlist = $rowlist ? $titleCol . ',' . $rowlist : $titleCol;
440  if ($this->clipBoard) {
441  $rowlist = str_replace('_LOCALIZATION_,', '_LOCALIZATION_,_CLIPBOARD_,', $rowlist);
442  $this->addElement_tdCssClass['_CLIPBOARD_'] = 'col-clipboard';
443  }
444  if ($this->bigControlPanel) {
445  $rowlist = str_replace('_LOCALIZATION_,', '_LOCALIZATION_,_CONTROL_,', $rowlist);
446  $this->addElement_tdCssClass['_CONTROL_'] = 'col-control';
447  }
448  $this->fieldArray = explode(',', $rowlist);
449 
450  // Add classes to table cells
451  $this->addElement_tdCssClass[$titleCol] = 'col-title col-responsive';
452  $this->addElement_tdCssClass['_LOCALIZATION_'] = 'col-localizationa';
453 
454  $folders = ‪ListUtility::resolveSpecialFolderNames($folders);
455 
456  $iOut = '';
457  // Directories are added
458  $this->eCounter = ‪$this->firstElementNumber;
459  list(, $code) = $this->‪fwd_rwd_nav();
460  $iOut .= $code;
461 
462  $iOut .= $this->‪formatDirList($folders);
463  // Files are added
464  $iOut .= $this->‪formatFileList(‪$files);
465 
466  $this->eCounter = $this->firstElementNumber + $this->iLimit < $this->totalItems
467  ? $this->firstElementNumber + $this->iLimit
468  : -1;
469  list(, $code) = $this->‪fwd_rwd_nav();
470  $iOut .= $code;
471 
472  // Header line is drawn
473  $theData = [];
474  foreach ($this->fieldArray as $v) {
475  if ($v === '_CLIPBOARD_' && $this->clipBoard) {
476  $cells = [];
477  $table = '_FILE';
478  $elFromTable = $this->clipObj->elFromTable($table);
479  if (!empty($elFromTable) && $this->folderObject->checkActionPermission('write')) {
480  $clipboardMode = $this->clipObj->clipData[$this->clipObj->current]['mode'] ?? '';
481  $permission = $clipboardMode === 'copy' ? 'copy' : 'move';
482  $addPasteButton = $this->folderObject->checkActionPermission($permission);
483  $elToConfirm = [];
484  foreach ($elFromTable as $key => $element) {
485  $clipBoardElement = $this->resourceFactory->retrieveFileOrFolderObject($element);
486  if ($clipBoardElement instanceof Folder && $clipBoardElement->getStorage()->isWithinFolder($clipBoardElement, $this->folderObject)) {
487  $addPasteButton = false;
488  }
489  $elToConfirm[$key] = $clipBoardElement->getName();
490  }
491  if ($addPasteButton) {
492  $cells[] = '<a class="btn btn-default t3js-modal-trigger"' .
493  ' href="' . htmlspecialchars($this->clipObj->pasteUrl(
494  '_FILE',
495  $this->folderObject->getCombinedIdentifier()
496  )) . '"'
497  . ' data-content="' . htmlspecialchars($this->clipObj->confirmMsgText(
498  '_FILE',
499  $this->path,
500  'into',
501  $elToConfirm
502  )) . '"'
503  . ' data-severity="warning"'
504  . ' data-title="' . htmlspecialchars($this->‪getLanguageService()->getLL('clip_paste')) . '"'
505  . ' title="' . htmlspecialchars($this->‪getLanguageService()->getLL('clip_paste')) . '">'
506  . $this->iconFactory->getIcon('actions-document-paste-into', ‪Icon::SIZE_SMALL)
507  ->render()
508  . '</a>';
509  } else {
510  $cells[] = ‪$this->spaceIcon;
511  }
512  }
513  if ($this->clipObj->current !== 'normal' && $iOut) {
514  $cells[] = $this->‪linkClipboardHeaderIcon('<span title="' . htmlspecialchars($this->‪getLanguageService()->getLL('clip_selectMarked')) . '">' . $this->iconFactory->getIcon('actions-edit-copy', ‪Icon::SIZE_SMALL)->render() . '</span>', $table, 'setCB');
515  $cells[] = $this->‪linkClipboardHeaderIcon('<span title="' . htmlspecialchars($this->‪getLanguageService()->getLL('clip_deleteMarked')) . '">' . $this->iconFactory->getIcon('actions-edit-delete', ‪Icon::SIZE_SMALL)->render(), $table, 'delete', $this->getLanguageService()->getLL('clip_deleteMarkedWarning'));
516  $onClick = 'checkOffCB(' . GeneralUtility::quoteJSvalue(implode(',', $this->CBnames)) . ', this); return false;';
517  $cells[] = '<a class="btn btn-default" rel="" href="#" onclick="' . htmlspecialchars($onClick) . '" title="' . htmlspecialchars($this->‪getLanguageService()->getLL('clip_markRecords')) . '">' . $this->iconFactory->getIcon('actions-document-select', ‪Icon::SIZE_SMALL)->render() . '</a>';
518  }
519  $theData[$v] = implode('', $cells);
520  } elseif ($v === '_REF_') {
521  $theData[$v] = htmlspecialchars($this->‪getLanguageService()->getLL('c_' . $v));
522  } else {
523  // Normal row:
524  $theT = $this->‪linkWrapSort(htmlspecialchars($this->‪getLanguageService()->getLL('c_' . $v)), $this->folderObject->getCombinedIdentifier(), $v);
525  $theData[$v] = $theT;
526  }
527  }
528 
529  $out .= '<thead>' . $this->‪addElement(1, '', $theData, '', '', '', 'th') . '</thead>';
530  $out .= '<tbody>' . $iOut . '</tbody>';
531  // half line is drawn
532  // finish
533  $out = '
534  <!--
535  Filelist table:
536  -->
537  <div class="panel panel-default">
538  <div class="table-fit">
539  <table class="table table-striped table-hover" id="typo3-filelist">
540  ' . $out . '
541  </table>
542  </div>
543  </div>';
544  } else {
546  $flashMessage = GeneralUtility::makeInstance(FlashMessage::class, $this->‪getLanguageService()->getLL('storageNotBrowsableMessage'), $this->‪getLanguageService()->getLL('storageNotBrowsableTitle'), ‪FlashMessage::INFO);
548  $flashMessageService = GeneralUtility::makeInstance(FlashMessageService::class);
550  $defaultFlashMessageQueue = $flashMessageService->getMessageQueueByIdentifier();
551  $defaultFlashMessageQueue->enqueue($flashMessage);
552  $out = '';
553  }
554  return $out;
555  }
556 
571  public function ‪addElement($h, $icon, $data, $rowParams = '', $_ = '', $_2 = '', $colType = 'td')
572  {
573  $colType = ($colType === 'th') ? 'th' : 'td';
574  $noWrap = $this->no_noWrap ? '' : ' nowrap';
575  // Start up:
576  $l10nParent = (int)($data['_l10nparent_'] ?? 0);
577  $out = '
578  <!-- Element, begin: -->
579  <tr ' . $rowParams . ' data-uid="' . (int)($data['uid'] ?? 0) . '" data-l10nparent="' . $l10nParent . '">';
580  // Show icon and lines
581  if ($this->showIcon) {
582  $out .= '
583  <' . $colType . ' class="col-icon nowrap">';
584  if (!$h) {
585  $out .= '&nbsp;';
586  } else {
587  for ($a = 0; $a < $h; $a++) {
588  if (!$a) {
589  if ($icon) {
590  $out .= $icon;
591  }
592  }
593  }
594  }
595  $out .= '</' . $colType . '>
596  ';
597  }
598  // Init rendering.
599  $colsp = '';
600  $lastKey = '';
601  $c = 0;
602  $ccount = 0;
603  // __label is used as the label key to circumvent problems with uid used as label (see #67756)
604  // as it was introduced later on, check if it really exists before using it
606  if ($colType === 'td' && array_key_exists('__label', $data)) {
607  ‪$fields[0] = '__label';
608  }
609  // Traverse field array which contains the data to present:
610  foreach (‪$fields as $vKey) {
611  if (isset($data[$vKey])) {
612  if ($lastKey) {
613  $cssClass = $this->addElement_tdCssClass[$lastKey] ?? '';
614  if ($this->oddColumnsCssClass && $ccount % 2 == 0) {
615  $cssClass = implode(' ', [$cssClass, $this->oddColumnsCssClass]);
616  }
617  $out .= '
618  <' . $colType . ' class="' . $cssClass . $noWrap . '"' . $colsp . ($this->addElement_tdParams[$lastKey] ?? '') . '>' . $data[$lastKey] . '</' . $colType . '>';
619  }
620  $lastKey = $vKey;
621  $c = 1;
622  $ccount++;
623  } else {
624  if (!$lastKey) {
625  $lastKey = $vKey;
626  }
627  $c++;
628  }
629  if ($c > 1) {
630  $colsp = ' colspan="' . $c . '"';
631  } else {
632  $colsp = '';
633  }
634  }
635  if ($lastKey) {
636  $cssClass = $this->addElement_tdCssClass[$lastKey] ?? '';
637  if ($this->oddColumnsCssClass) {
638  $cssClass = implode(' ', [$cssClass, $this->oddColumnsCssClass]);
639  }
640  $out .= '
641  <' . $colType . ' class="' . $cssClass . $noWrap . '"' . $colsp . ($this->addElement_tdParams[$lastKey] ?? '') . '>' . $data[$lastKey] . '</' . $colType . '>';
642  }
643  // End row
644  $out .= '
645  </tr>';
646  // Return row.
647  return $out;
648  }
649 
653  public function ‪writeTop()
654  {
655  }
656 
663  public function ‪fwd_rwd_nav($table = '')
664  {
665  $code = '';
666  if ($this->eCounter >= $this->firstElementNumber && $this->eCounter < $this->firstElementNumber + $this->iLimit) {
667  if ($this->firstElementNumber && $this->eCounter == $this->firstElementNumber) {
668  // Reverse
669  $theData = [];
670  $titleCol = $this->fieldArray[0];
671  $theData[$titleCol] = $this->‪fwd_rwd_HTML('fwd', $this->eCounter, $table);
672  $code = $this->‪addElement(1, '', $theData, 'class="fwd_rwd_nav"');
673  }
674  return [1, $code];
675  }
676  if ($this->eCounter == $this->firstElementNumber + $this->iLimit) {
677  // Forward
678  $theData = [];
679  $titleCol = $this->fieldArray[0];
680  $theData[$titleCol] = $this->‪fwd_rwd_HTML('rwd', $this->eCounter, $table);
681  $code = $this->‪addElement(1, '', $theData, 'class="fwd_rwd_nav"');
682  }
683  return [0, $code];
684  }
685 
695  public function ‪fwd_rwd_HTML($type, $pointer, $table = '')
696  {
697  $content = '';
698  $tParam = $table ? '&table=' . rawurlencode($table) : '';
699  switch ($type) {
700  case 'fwd':
701  $href = $this->‪listURL() . '&pointer=' . ($pointer - ‪$this->iLimit) . $tParam;
702  $content = '<a href="' . htmlspecialchars($href) . '">' . $this->iconFactory->getIcon(
703  'actions-move-up',
705  )->render() . ' <i>[' . (max(0, $pointer - $this->iLimit) + 1) . ' - ' . $pointer . ']</i></a>';
706  break;
707  case 'rwd':
708  $href = $this->‪listURL() . '&pointer=' . $pointer . $tParam;
709  $content = '<a href="' . htmlspecialchars($href) . '">' . $this->iconFactory->getIcon(
710  'actions-move-down',
712  )->render() . ' <i>[' . ($pointer + 1) . ' - ' . $this->totalItems . ']</i></a>';
713  break;
714  }
715  return $content;
716  }
717 
723  public function ‪CBfunctions()
724  {
725  return '
726  // checkOffCB()
727  function checkOffCB(listOfCBnames, link) { //
728  var checkBoxes, flag, i;
729  var checkBoxes = listOfCBnames.split(",");
730  if (link.rel === "") {
731  link.rel = "allChecked";
732  flag = true;
733  } else {
734  link.rel = "";
735  flag = false;
736  }
737  for (i = 0; i < checkBoxes.length; i++) {
738  setcbValue(checkBoxes[i], flag);
739  }
740  }
741  // cbValue()
742  function cbValue(CBname) { //
743  var CBfullName = "CBC["+CBname+"]";
744  return (document.dblistForm[CBfullName] && document.dblistForm[CBfullName].checked ? 1 : 0);
745  }
746  // setcbValue()
747  function setcbValue(CBname,flag) { //
748  CBfullName = "CBC["+CBname+"]";
749  if(document.dblistForm[CBfullName]) {
750  document.dblistForm[CBfullName].checked = flag ? "on" : 0;
751  }
752  }
753 
754  ';
755  }
756 
760  public function ‪initializeLanguages()
761  {
762  // Look up page overlays:
763  $localizationParentField = ‪$GLOBALS['TCA']['pages']['ctrl']['transOrigPointerField'];
764  $languageField = ‪$GLOBALS['TCA']['pages']['ctrl']['languageField'];
765  $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)
766  ->getQueryBuilderForTable('pages');
767  $queryBuilder->getRestrictions()
768  ->removeAll()
769  ->add(GeneralUtility::makeInstance(DeletedRestriction::class))
770  ->add(GeneralUtility::makeInstance(BackendWorkspaceRestriction::class));
771  $result = $queryBuilder
772  ->select('*')
773  ->from('pages')
774  ->where(
775  $queryBuilder->expr()->andX(
776  $queryBuilder->expr()->eq(
777  $localizationParentField,
778  $queryBuilder->createNamedParameter($this->id, \PDO::PARAM_INT)
779  ),
780  $queryBuilder->expr()->gt(
781  $languageField,
782  $queryBuilder->createNamedParameter(0, \PDO::PARAM_INT)
783  )
784  )
785  )
786  ->execute();
787 
788  $this->pageOverlays = [];
789  while ($row = $result->fetch()) {
790  $this->pageOverlays[$row[$languageField]] = $row;
791  }
792 
793  $this->languageIconTitles = $this->‪getTranslateTools()->‪getSystemLanguages($this->id);
794  }
795 
803  public function ‪languageFlag($sys_language_uid, $addAsAdditionalText = true)
804  {
805  $out = '';
806  $title = htmlspecialchars($this->languageIconTitles[$sys_language_uid]['title']);
807  if ($this->languageIconTitles[$sys_language_uid]['flagIcon']) {
808  $out .= '<span title="' . $title . '">' . $this->iconFactory->getIcon(
809  $this->languageIconTitles[$sys_language_uid]['flagIcon'],
811  )->render() . '</span>';
812  if (!$addAsAdditionalText) {
813  return $out;
814  }
815  $out .= '&nbsp;';
816  }
817  $out .= $title;
818  return $out;
819  }
820 
828  protected function ‪getLinkToParentFolder(Folder $currentFolder)
829  {
830  $levelUp = '';
831  try {
832  $currentStorage = $currentFolder->getStorage();
833  $parentFolder = $currentFolder->getParentFolder();
834  if ($parentFolder->getIdentifier() !== $currentFolder->getIdentifier() && $currentStorage->isWithinFileMountBoundaries($parentFolder)) {
835  $levelUp = $this->‪linkWrapDir(
836  '<span title="' . htmlspecialchars($this->‪getLanguageService()->sL('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.upOneLevel')) . '">'
837  . $this->iconFactory->getIcon('actions-view-go-up', ‪Icon::SIZE_SMALL)->render()
838  . '</span>',
839  $parentFolder
840  );
841  }
842  } catch (\Exception $e) {
843  }
844  return $levelUp;
845  }
846 
852  public function ‪getFolderInfo()
853  {
854  if ($this->counter == 1) {
855  $fileLabel = htmlspecialchars($this->‪getLanguageService()->getLL('file'));
856  } else {
857  $fileLabel = htmlspecialchars($this->‪getLanguageService()->getLL('files'));
858  }
859  return $this->counter . ' ' . $fileLabel . ', ' . GeneralUtility::formatSize($this->totalbytes, htmlspecialchars($this->‪getLanguageService()->getLL('byteSizeUnits')));
860  }
861 
868  public function ‪formatDirList(array $folders)
869  {
870  $out = '';
871  foreach ($folders as $folderName => ‪$folderObject) {
872  $role = ‪$folderObject->‪getRole();
873  if ($role === ‪FolderInterface::ROLE_PROCESSING) {
874  // don't show processing-folder
875  continue;
876  }
877  if ($role !== ‪FolderInterface::ROLE_DEFAULT) {
878  $displayName = '<strong>' . htmlspecialchars($folderName) . '</strong>';
879  } else {
880  $displayName = htmlspecialchars($folderName);
881  }
882 
883  $isLocked = ‪$folderObject instanceof InaccessibleFolder;
884  $isWritable = ‪$folderObject->‪checkActionPermission('write');
885 
886  // Initialization
887  $this->counter++;
888 
889  // The icon with link
890  $theIcon = '<span title="' . htmlspecialchars($folderName) . '">' . $this->iconFactory->getIconForResource(‪$folderObject, ‪Icon::SIZE_SMALL)->render() . '</span>';
891  if (!$isLocked) {
893  }
894 
895  // Preparing and getting the data-array
896  $theData = [];
897  if ($isLocked) {
898  foreach ($this->fieldArray as $field) {
899  $theData[$field] = '';
900  }
901  $theData['file'] = $displayName;
902  } else {
903  foreach ($this->fieldArray as $field) {
904  switch ($field) {
905  case 'size':
906  try {
907  $numFiles = ‪$folderObject->‪getFileCount();
908  } catch (InsufficientFolderAccessPermissionsException $e) {
909  $numFiles = 0;
910  }
911  $theData[$field] = $numFiles . ' ' . htmlspecialchars($this->‪getLanguageService()->getLL(($numFiles === 1 ? 'file' : 'files')));
912  break;
913  case 'rw':
914  $theData[$field] = '<strong class="text-danger">' . htmlspecialchars($this->‪getLanguageService()->getLL('read')) . '</strong>' . (!$isWritable ? '' : '<strong class="text-danger">' . htmlspecialchars($this->‪getLanguageService()->getLL('write')) . '</strong>');
915  break;
916  case 'fileext':
917  $theData[$field] = htmlspecialchars($this->‪getLanguageService()->getLL('folder'));
918  break;
919  case 'tstamp':
921  $theData[$field] = $tstamp ? ‪BackendUtility::date($tstamp) : '-';
922  break;
923  case 'file':
924  $theData[$field] = $this->‪linkWrapDir($displayName, ‪$folderObject);
925  break;
926  case '_CONTROL_':
927  $theData[$field] = $this->‪makeEdit($folderObject);
928  break;
929  case '_CLIPBOARD_':
930  $theData[$field] = $this->‪makeClip($folderObject);
931  break;
932  case '_REF_':
933  $theData[$field] = $this->‪makeRef($folderObject);
934  break;
935  default:
936  $theData[$field] = GeneralUtility::fixed_lgd_cs($theData[$field] ?? '', $this->fixedL);
937  }
938  }
939  }
940  $out .= $this->‪addElement(1, $theIcon, $theData);
941  }
942  return $out;
943  }
944 
952  public function ‪linkWrapDir($title, Folder ‪$folderObject)
953  {
955  $uriBuilder = GeneralUtility::makeInstance(\‪TYPO3\CMS\Backend\Routing\UriBuilder::class);
956  $href = (string)$uriBuilder->buildUriFromRoute('file_FilelistList', ['id' => ‪$folderObject->‪getCombinedIdentifier()]);
957  $onclick = ' onclick="' . htmlspecialchars('top.document.getElementsByName("nav_frame")[0].contentWindow.Tree.highlightActiveItem("file","folder' . GeneralUtility::md5int(‪$folderObject->‪getCombinedIdentifier()) . '_"+top.fsMod.currentBank)') . '"';
958  // Sometimes $code contains plain HTML tags. In such a case the string should not be modified!
959  if ((string)$title === strip_tags($title)) {
960  return '<a href="' . htmlspecialchars($href) . '"' . $onclick . ' title="' . htmlspecialchars($title) . '">' . $title . '</a>';
961  }
962  return '<a href="' . htmlspecialchars($href) . '"' . $onclick . '>' . $title . '</a>';
963  }
964 
972  public function ‪linkWrapFile($code, File $fileObject)
973  {
974  try {
975  if ($fileObject instanceof File && $fileObject->isIndexed() && $fileObject->checkActionPermission('editMeta') && $this->getBackendUser()->check('tables_modify', 'sys_file_metadata')) {
976  $metaData = $fileObject->_getMetaData();
977  $urlParameters = [
978  'edit' => [
979  'sys_file_metadata' => [
980  $metaData['uid'] => 'edit'
981  ]
982  ],
983  'returnUrl' => $this->‪listURL()
984  ];
986  $uriBuilder = GeneralUtility::makeInstance(\‪TYPO3\CMS\Backend\Routing\UriBuilder::class);
987  $url = (string)$uriBuilder->buildUriFromRoute('record_edit', $urlParameters);
988  $title = htmlspecialchars($this->‪getLanguageService()->sL('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:cm.editMetadata'));
989  $code = '<a class="responsive-title" href="' . htmlspecialchars($url) . '" title="' . $title . '">' . $code . '</a>';
990  }
991  } catch (\Exception $e) {
992  // intentional fall-through
993  }
994  return $code;
995  }
996 
1008  public function ‪listURL($altId = '', $table = '-1', $exclList = '')
1009  {
1010  return GeneralUtility::linkThisScript([
1011  'target' => rawurlencode($this->folderObject->getCombinedIdentifier()),
1012  'imagemode' => $this->thumbs
1013  ]);
1014  }
1015 
1022  public function ‪formatFileList(array ‪$files)
1023  {
1025  $uriBuilder = GeneralUtility::makeInstance(\‪TYPO3\CMS\Backend\Routing\UriBuilder::class);
1026  $out = '';
1027  // first two keys are "0" (default) and "-1" (multiple), after that comes the "other languages"
1028  $allSystemLanguages = GeneralUtility::makeInstance(TranslationConfigurationProvider::class)->getSystemLanguages();
1029  $systemLanguages = array_filter($allSystemLanguages, function ($languageRecord) {
1030  if ($languageRecord['uid'] === -1 || $languageRecord['uid'] === 0 || !$this->‪getBackendUser()->checkLanguageAccess($languageRecord['uid'])) {
1031  return false;
1032  }
1033  return true;
1034  });
1035 
1036  foreach (‪$files as $fileObject) {
1037  // Initialization
1038  $this->counter++;
1039  $this->totalbytes += $fileObject->getSize();
1040  $ext = $fileObject->getExtension();
1041  $fileName = trim($fileObject->getName());
1042  // The icon with link
1043  $theIcon = '<span title="' . htmlspecialchars($fileName . ' [' . (int)$fileObject->getUid() . ']') . '">'
1044  . $this->iconFactory->getIconForResource($fileObject, ‪Icon::SIZE_SMALL)->render() . '</span>';
1045  $theIcon = ‪BackendUtility::wrapClickMenuOnIcon($theIcon, 'sys_file', $fileObject->getCombinedIdentifier());
1046  // Preparing and getting the data-array
1047  $theData = [];
1048  foreach ($this->fieldArray as $field) {
1049  switch ($field) {
1050  case 'size':
1051  $theData[$field] = GeneralUtility::formatSize($fileObject->getSize(), htmlspecialchars($this->‪getLanguageService()->getLL('byteSizeUnits')));
1052  break;
1053  case 'rw':
1054  $theData[$field] = '' . (!$fileObject->checkActionPermission('read') ? ' ' : '<strong class="text-danger">' . htmlspecialchars($this->‪getLanguageService()->getLL('read')) . '</strong>') . (!$fileObject->checkActionPermission('write') ? '' : '<strong class="text-danger">' . htmlspecialchars($this->‪getLanguageService()->getLL('write')) . '</strong>');
1055  break;
1056  case 'fileext':
1057  $theData[$field] = htmlspecialchars(strtoupper($ext));
1058  break;
1059  case 'tstamp':
1060  $theData[$field] = ‪BackendUtility::date($fileObject->getModificationTime());
1061  break;
1062  case '_CONTROL_':
1063  $theData[$field] = $this->‪makeEdit($fileObject);
1064  break;
1065  case '_CLIPBOARD_':
1066  $theData[$field] = $this->‪makeClip($fileObject);
1067  break;
1068  case '_LOCALIZATION_':
1069  if (!empty($systemLanguages) && $fileObject->isIndexed() && $fileObject->checkActionPermission('editMeta') && $this->getBackendUser()->check('tables_modify', 'sys_file_metadata')) {
1070  $metaDataRecord = $fileObject->_getMetaData();
1071  $translations = $this->‪getTranslationsForMetaData($metaDataRecord);
1072  $languageCode = '';
1073 
1074  foreach ($systemLanguages as $language) {
1075  $languageId = $language['uid'];
1076  $flagIcon = $language['flagIcon'];
1077  if (array_key_exists($languageId, $translations)) {
1078  $title = htmlspecialchars(sprintf($this->‪getLanguageService()->getLL('editMetadataForLanguage'), $language['title']));
1079  // @todo the overlay for the flag needs to be added ($flagIcon . '-overlay')
1080  $urlParameters = [
1081  'edit' => [
1082  'sys_file_metadata' => [
1083  $translations[$languageId]['uid'] => 'edit'
1084  ]
1085  ],
1086  'returnUrl' => $this->‪listURL()
1087  ];
1088  $flagButtonIcon = $this->iconFactory->getIcon($flagIcon, ‪Icon::SIZE_SMALL, 'overlay-edit')->render();
1089  $url = (string)$uriBuilder->buildUriFromRoute('record_edit', $urlParameters);
1090  $languageCode .= '<a href="' . htmlspecialchars($url) . '" class="btn btn-default" title="' . $title . '">'
1091  . $flagButtonIcon . '</a>';
1092  } else {
1093  $parameters = [
1094  'justLocalized' => 'sys_file_metadata:' . $metaDataRecord['uid'] . ':' . $languageId,
1095  'returnUrl' => $this->‪listURL()
1096  ];
1097  $returnUrl = (string)$uriBuilder->buildUriFromRoute('record_edit', $parameters);
1099  '&cmd[sys_file_metadata][' . $metaDataRecord['uid'] . '][localize]=' . $languageId,
1100  $returnUrl
1101  );
1102  $flagButtonIcon = '<span title="' . htmlspecialchars(sprintf($this->‪getLanguageService()->getLL('createMetadataForLanguage'), $language['title'])) . '">' . $this->iconFactory->getIcon($flagIcon, ‪Icon::SIZE_SMALL, 'overlay-new')->render() . '</span>';
1103  $languageCode .= '<a href="' . htmlspecialchars($href) . '" class="btn btn-default">' . $flagButtonIcon . '</a> ';
1104  }
1105  }
1106 
1107  // Hide flag button bar when not translated yet
1108  $theData[$field] = ' <div class="localisationData btn-group" data-fileid="' . $fileObject->getUid() . '"' .
1109  (empty($translations) ? ' style="display: none;"' : '') . '>' . $languageCode . '</div>';
1110  $theData[$field] .= '<a class="btn btn-default filelist-translationToggler" data-fileid="' . $fileObject->getUid() . '">' .
1111  '<span title="' . htmlspecialchars($this->‪getLanguageService()->getLL('translateMetadata')) . '">'
1112  . $this->iconFactory->getIcon('mimetypes-x-content-page-language-overlay', ‪Icon::SIZE_SMALL)->render() . '</span>'
1113  . '</a>';
1114  }
1115  break;
1116  case '_REF_':
1117  $theData[$field] = $this->‪makeRef($fileObject);
1118  break;
1119  case 'file':
1120  // Edit metadata of file
1121  $theData[$field] = $this->‪linkWrapFile(htmlspecialchars($fileName), $fileObject);
1122 
1123  if ($fileObject->isMissing()) {
1124  $theData[$field] .= '<span class="label label-danger label-space-left">'
1125  . htmlspecialchars($this->‪getLanguageService()->sL('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:warning.file_missing'))
1126  . '</span>';
1127  // Thumbnails?
1128  } elseif ($this->thumbs && ($this->‪isImage($ext) || $this->‪isMediaFile($ext))) {
1129  $processedFile = $fileObject->process(
1131  [
1132  'width' => $this->thumbnailConfiguration->getWidth(),
1133  'height' => $this->thumbnailConfiguration->getHeight()
1134  ]
1135  );
1136  if ($processedFile) {
1137  $thumbUrl = $processedFile->getPublicUrl(true);
1138  $theData[$field] .= '<br /><img src="' . htmlspecialchars($thumbUrl) . '" ' .
1139  'width="' . $processedFile->getProperty('width') . '" ' .
1140  'height="' . $processedFile->getProperty('height') . '" ' .
1141  'title="' . htmlspecialchars($fileName) . '" alt="" />';
1142  }
1143  }
1144  break;
1145  default:
1146  $theData[$field] = '';
1147  if ($fileObject->hasProperty($field)) {
1148  $theData[$field] = htmlspecialchars(GeneralUtility::fixed_lgd_cs($fileObject->getProperty($field), $this->fixedL));
1149  }
1150  }
1151  }
1152  $out .= $this->‪addElement(1, $theIcon, $theData);
1153  }
1154  return $out;
1155  }
1156 
1163  protected function ‪getTranslationsForMetaData($metaDataRecord)
1164  {
1165  $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('sys_file_metadata');
1166  $queryBuilder->getRestrictions()->removeAll();
1167  $translationRecords = $queryBuilder->select('*')
1168  ->from('sys_file_metadata')
1169  ->where(
1170  $queryBuilder->expr()->eq(
1171  ‪$GLOBALS['TCA']['sys_file_metadata']['ctrl']['transOrigPointerField'],
1172  $queryBuilder->createNamedParameter($metaDataRecord['uid'], \PDO::PARAM_INT)
1173  ),
1174  $queryBuilder->expr()->gt(
1175  ‪$GLOBALS['TCA']['sys_file_metadata']['ctrl']['languageField'],
1176  $queryBuilder->createNamedParameter(0, \PDO::PARAM_INT)
1177  )
1178  )
1179  ->execute()
1180  ->fetchAll();
1182  $translations = [];
1183  foreach ($translationRecords as $record) {
1184  $translations[$record[‪$GLOBALS['TCA']['sys_file_metadata']['ctrl']['languageField']]] = $record;
1185  }
1186  return $translations;
1187  }
1188 
1195  public function ‪isImage($ext)
1196  {
1197  return GeneralUtility::inList(‪$GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'], strtolower($ext));
1198  }
1199 
1206  public function ‪isMediaFile($ext)
1207  {
1208  return GeneralUtility::inList(‪$GLOBALS['TYPO3_CONF_VARS']['SYS']['mediafile_ext'], strtolower($ext));
1209  }
1210 
1219  public function ‪linkWrapSort($code, $folderIdentifier, $col)
1220  {
1221  $params = ['id' => $folderIdentifier, 'SET' => ['sort' => $col]];
1222 
1223  if ($this->sort === $col) {
1224  // Check reverse sorting
1225  $params['SET']['reverse'] = ($this->sortRev ? '0' : '1');
1226  $sortArrow = $this->iconFactory->getIcon('status-status-sorting-' . ($this->sortRev ? 'desc' : 'asc'), ‪Icon::SIZE_SMALL)->render();
1227  } else {
1228  $params['SET']['reverse'] = 0;
1229  $sortArrow = '';
1230  }
1232  $uriBuilder = GeneralUtility::makeInstance(\‪TYPO3\CMS\Backend\Routing\UriBuilder::class);
1233  $href = (string)$uriBuilder->buildUriFromRoute('file_FilelistList', $params);
1234  return '<a href="' . htmlspecialchars($href) . '">' . $code . ' ' . $sortArrow . '</a>';
1235  }
1236 
1243  public function ‪makeClip($fileOrFolderObject)
1244  {
1245  if (!$fileOrFolderObject->checkActionPermission('read')) {
1246  return '';
1247  }
1248  $cells = [];
1249  $fullIdentifier = $fileOrFolderObject->getCombinedIdentifier();
1250  $fullName = $fileOrFolderObject->getName();
1251  $md5 = GeneralUtility::shortMD5($fullIdentifier);
1252  // For normal clipboard, add copy/cut buttons:
1253  if ($this->clipObj->current === 'normal') {
1254  $isSel = $this->clipObj->isSelected('_FILE', $md5);
1255  $copyTitle = htmlspecialchars($this->‪getLanguageService()->sL('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:cm.copy'));
1256  $cutTitle = htmlspecialchars($this->‪getLanguageService()->sL('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:cm.cut'));
1257  $copyIcon = $this->iconFactory->getIcon('actions-edit-copy', ‪Icon::SIZE_SMALL)->render();
1258  $cutIcon = $this->iconFactory->getIcon('actions-edit-cut', ‪Icon::SIZE_SMALL)->render();
1259 
1260  if ($isSel === 'copy') {
1261  $copyIcon = $this->iconFactory->getIcon('actions-edit-copy-release', ‪Icon::SIZE_SMALL)->render();
1262  } elseif ($isSel === 'cut') {
1263  $cutIcon = $this->iconFactory->getIcon('actions-edit-cut-release', ‪Icon::SIZE_SMALL)->render();
1264  }
1265 
1266  if ($fileOrFolderObject->checkActionPermission('copy')) {
1267  $cells[] = '<a class="btn btn-default" href="' . htmlspecialchars($this->clipObj->selUrlFile(
1268  $fullIdentifier,
1269  1,
1270  $isSel === 'copy'
1271  )) . '" title="' . $copyTitle . '">' . $copyIcon . '</a>';
1272  } else {
1273  $cells[] = ‪$this->spaceIcon;
1274  }
1275  // we can only cut if file can be moved
1276  if ($fileOrFolderObject->checkActionPermission('move')) {
1277  $cells[] = '<a class="btn btn-default" href="' . htmlspecialchars($this->clipObj->selUrlFile(
1278  $fullIdentifier,
1279  0,
1280  $isSel === 'cut'
1281  )) . '" title="' . $cutTitle . '">' . $cutIcon . '</a>';
1282  } else {
1283  $cells[] = ‪$this->spaceIcon;
1284  }
1285  } else {
1286  // For numeric pads, add select checkboxes:
1287  $n = '_FILE|' . $md5;
1288  $this->CBnames[] = $n;
1289  $checked = $this->clipObj->isSelected('_FILE', $md5) ? ' checked="checked"' : '';
1290  $cells[] = '<input type="hidden" name="CBH[' . $n . ']" value="0" /><label class="btn btn-default btn-checkbox"><input type="checkbox" name="CBC[' . $n . ']" value="' . htmlspecialchars($fullIdentifier) . '" ' . $checked . ' /><span class="t3-icon fa"></span></label>';
1291  }
1292  // Display PASTE button, if directory:
1293  $elFromTable = $this->clipObj->elFromTable('_FILE');
1294  if ($fileOrFolderObject instanceof ‪Folder && !empty($elFromTable) && $fileOrFolderObject->‪checkActionPermission('write')) {
1295  $clipboardMode = $this->clipObj->clipData[$this->clipObj->current]['mode'] ?? '';
1296  $permission = $clipboardMode === 'copy' ? 'copy' : 'move';
1297  $addPasteButton = $this->folderObject->checkActionPermission($permission);
1298  $elToConfirm = [];
1299  foreach ($elFromTable as $key => $element) {
1300  $clipBoardElement = $this->resourceFactory->retrieveFileOrFolderObject($element);
1301  if ($clipBoardElement instanceof ‪Folder && $clipBoardElement->‪getStorage()->‪isWithinFolder($clipBoardElement, $fileOrFolderObject)) {
1302  $addPasteButton = false;
1303  }
1304  $elToConfirm[$key] = $clipBoardElement->getName();
1305  }
1306  if ($addPasteButton) {
1307  $cells[] = '<a class="btn btn-default t3js-modal-trigger" '
1308  . ' href="' . htmlspecialchars($this->clipObj->pasteUrl('_FILE', $fullIdentifier)) . '"'
1309  . ' data-content="' . htmlspecialchars($this->clipObj->confirmMsgText('_FILE', $fullName, 'into', $elToConfirm)) . '"'
1310  . ' data-severity="warning"'
1311  . ' data-title="' . htmlspecialchars($this->‪getLanguageService()->getLL('clip_pasteInto')) . '"'
1312  . ' title="' . htmlspecialchars($this->‪getLanguageService()->getLL('clip_pasteInto')) . '"'
1313  . '>'
1314  . $this->iconFactory->getIcon('actions-document-paste-into', ‪Icon::SIZE_SMALL)->render()
1315  . '</a>';
1316  } else {
1317  $cells[] = ‪$this->spaceIcon;
1318  }
1319  }
1320  // Compile items into a DIV-element:
1321  return ' <div class="btn-group" role="group">' . implode('', $cells) . '</div>';
1322  }
1323 
1330  public function ‪makeEdit($fileOrFolderObject)
1331  {
1332  $cells = [];
1333  $fullIdentifier = $fileOrFolderObject->getCombinedIdentifier();
1334  $md5 = GeneralUtility::shortMD5($fullIdentifier);
1336  $uriBuilder = GeneralUtility::makeInstance(\‪TYPO3\CMS\Backend\Routing\UriBuilder::class);
1337 
1338  // Edit file content (if editable)
1339  if ($fileOrFolderObject instanceof File && $fileOrFolderObject->checkActionPermission('write') && GeneralUtility::inList(‪$GLOBALS['TYPO3_CONF_VARS']['SYS']['textfile_ext'], $fileOrFolderObject->getExtension())) {
1340  $url = (string)$uriBuilder->buildUriFromRoute('file_edit', ['target' => $fullIdentifier]);
1341  $editOnClick = 'top.list_frame.location.href=' . GeneralUtility::quoteJSvalue($url) . '+\'&returnUrl=\'+top.rawurlencode(top.list_frame.document.location.pathname+top.list_frame.document.location.search);return false;';
1342  $cells['edit'] = '<a href="#" class="btn btn-default" onclick="' . htmlspecialchars($editOnClick) . '" title="' . $this->‪getLanguageService()->‪sL('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:cm.editcontent') . '">'
1343  . $this->iconFactory->getIcon('actions-page-open', ‪Icon::SIZE_SMALL)->render()
1344  . '</a>';
1345  } else {
1346  $cells['edit'] = ‪$this->spaceIcon;
1347  }
1348 
1349  // Edit metadata of file
1350  if ($fileOrFolderObject instanceof File && $fileOrFolderObject->checkActionPermission('editMeta') && $this->getBackendUser()->check('tables_modify', 'sys_file_metadata')) {
1351  $metaData = $fileOrFolderObject->_getMetaData();
1352  $urlParameters = [
1353  'edit' => [
1354  'sys_file_metadata' => [
1355  $metaData['uid'] => 'edit'
1356  ]
1357  ],
1358  'returnUrl' => $this->‪listURL()
1359  ];
1360  $url = (string)$uriBuilder->buildUriFromRoute('record_edit', $urlParameters);
1361  $title = htmlspecialchars($this->‪getLanguageService()->sL('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:cm.editMetadata'));
1362  $cells['metadata'] = '<a class="btn btn-default" href="' . htmlspecialchars($url) . '" title="' . $title . '">' . $this->iconFactory->getIcon('actions-open', ‪Icon::SIZE_SMALL)->render() . '</a>';
1363  }
1364 
1365  // document view
1366  if ($fileOrFolderObject instanceof File) {
1367  $fileUrl = $fileOrFolderObject->getPublicUrl(true);
1368  if ($fileUrl) {
1369  $aOnClick = 'return top.openUrlInWindow(' . GeneralUtility::quoteJSvalue($fileUrl) . ', \'WebFile\');';
1370  $cells['view'] = '<a href="#" class="btn btn-default" onclick="' . htmlspecialchars($aOnClick) . '" title="' . $this->‪getLanguageService()->‪sL('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:cm.view') . '">' . $this->iconFactory->getIcon('actions-document-view', ‪Icon::SIZE_SMALL)->render() . '</a>';
1371  } else {
1372  $cells['view'] = ‪$this->spaceIcon;
1373  }
1374  } else {
1375  $cells['view'] = ‪$this->spaceIcon;
1376  }
1377 
1378  // replace file
1379  if ($fileOrFolderObject instanceof File && $fileOrFolderObject->checkActionPermission('replace')) {
1380  $url = (string)$uriBuilder->buildUriFromRoute('file_replace', ['target' => $fullIdentifier, 'uid' => $fileOrFolderObject->getUid()]);
1381  $replaceOnClick = 'top.list_frame.location.href = ' . GeneralUtility::quoteJSvalue($url) . '+\'&returnUrl=\'+top.rawurlencode(top.list_frame.document.location.pathname+top.list_frame.document.location.search);return false;';
1382  $cells['replace'] = '<a href="#" class="btn btn-default" onclick="' . $replaceOnClick . '" title="' . $this->‪getLanguageService()->‪sL('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:cm.replace') . '">' . $this->iconFactory->getIcon('actions-edit-replace', ‪Icon::SIZE_SMALL)->render() . '</a>';
1383  }
1384 
1385  // rename the file
1386  if ($fileOrFolderObject->checkActionPermission('rename')) {
1387  $url = (string)$uriBuilder->buildUriFromRoute('file_rename', ['target' => $fullIdentifier]);
1388  $renameOnClick = 'top.list_frame.location.href = ' . GeneralUtility::quoteJSvalue($url) . '+\'&returnUrl=\'+top.rawurlencode(top.list_frame.document.location.pathname+top.list_frame.document.location.search);return false;';
1389  $cells['rename'] = '<a href="#" class="btn btn-default" onclick="' . htmlspecialchars($renameOnClick) . '" title="' . $this->‪getLanguageService()->‪sL('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:cm.rename') . '">' . $this->iconFactory->getIcon('actions-edit-rename', ‪Icon::SIZE_SMALL)->render() . '</a>';
1390  } else {
1391  $cells['rename'] = ‪$this->spaceIcon;
1392  }
1393 
1394  // upload files
1395  if ($fileOrFolderObject->getStorage()->checkUserActionPermission('add', 'File') && $fileOrFolderObject->checkActionPermission('write')) {
1396  if ($fileOrFolderObject instanceof Folder) {
1397  $url = (string)$uriBuilder->buildUriFromRoute('file_upload', ['target' => $fullIdentifier]);
1398  $uploadOnClick = 'top.list_frame.location.href = ' . GeneralUtility::quoteJSvalue($url) . '+\'&returnUrl=\'+top.rawurlencode(top.list_frame.document.location.pathname+top.list_frame.document.location.search);return false;';
1399  $cells['upload'] = '<a href="#" class="btn btn-default" onclick="' . htmlspecialchars($uploadOnClick) . '" title="' . htmlspecialchars($this->‪getLanguageService()->sL('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:cm.upload')) . '">' . $this->iconFactory->getIcon('actions-edit-upload', ‪Icon::SIZE_SMALL)->render() . '</a>';
1400  }
1401  }
1402 
1403  if ($fileOrFolderObject->checkActionPermission('read')) {
1404  $infoOnClick = '';
1405  if ($fileOrFolderObject instanceof Folder) {
1406  $infoOnClick = 'top.TYPO3.InfoWindow.showItem(\'_FOLDER\', ' . GeneralUtility::quoteJSvalue($fullIdentifier) . ');return false;';
1407  } elseif ($fileOrFolderObject instanceof File) {
1408  $infoOnClick = 'top.TYPO3.InfoWindow.showItem(\'_FILE\', ' . GeneralUtility::quoteJSvalue($fullIdentifier) . ');return false;';
1409  }
1410  $cells['info'] = '<a href="#" class="btn btn-default" onclick="' . htmlspecialchars($infoOnClick) . '" title="' . $this->‪getLanguageService()->‪sL('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:cm.info') . '">' . $this->iconFactory->getIcon('actions-document-info', ‪Icon::SIZE_SMALL)->render() . '</a>';
1411  } else {
1412  $cells['info'] = ‪$this->spaceIcon;
1413  }
1414 
1415  // delete the file
1416  if ($fileOrFolderObject->checkActionPermission('delete')) {
1417  $identifier = $fileOrFolderObject->getIdentifier();
1418  if ($fileOrFolderObject instanceof Folder) {
1419  $referenceCountText = ‪BackendUtility::referenceCount('_FILE', $identifier, ' ' . $this->‪getLanguageService()->sL('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.referencesToFolder'));
1420  $deleteType = 'delete_folder';
1421  } else {
1422  $referenceCountText = ‪BackendUtility::referenceCount('sys_file', $fileOrFolderObject->getUid(), ' ' . $this->getLanguageService()->sL('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.referencesToFile'));
1423  $deleteType = 'delete_file';
1424  }
1425 
1426  if ($this->‪getBackendUser()->jsConfirmation(‪JsConfirmation::DELETE)) {
1427  $confirmationCheck = '1';
1428  } else {
1429  $confirmationCheck = '0';
1430  }
1431 
1432  $deleteUrl = (string)$uriBuilder->buildUriFromRoute('tce_file');
1433  $confirmationMessage = sprintf($this->‪getLanguageService()->sL('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:mess.delete'), $fileOrFolderObject->getName()) . $referenceCountText;
1434  $title = $this->‪getLanguageService()->‪sL('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:cm.delete');
1435  $cells['delete'] = '<a href="#" class="btn btn-default t3js-filelist-delete" data-content="' . htmlspecialchars($confirmationMessage)
1436  . '" data-check="' . $confirmationCheck
1437  . '" data-delete-url="' . htmlspecialchars($deleteUrl)
1438  . '" data-title="' . htmlspecialchars($title)
1439  . '" data-identifier="' . htmlspecialchars($fileOrFolderObject->getCombinedIdentifier())
1440  . '" data-delete-type="' . $deleteType
1441  . '" title="' . htmlspecialchars($title) . '">'
1442  . $this->iconFactory->getIcon('actions-edit-delete', ‪Icon::SIZE_SMALL)->render() . '</a>';
1443  } else {
1444  $cells['delete'] = ‪$this->spaceIcon;
1445  }
1446 
1447  // Hook for manipulating edit icons.
1448  $cells['__fileOrFolderObject'] = $fileOrFolderObject;
1449  foreach (‪$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['fileList']['editIconsHook'] ?? [] as $className) {
1450  $hookObject = GeneralUtility::makeInstance($className);
1451  if (!$hookObject instanceof FileListEditIconHookInterface) {
1452  throw new \UnexpectedValueException(
1453  $className . ' must implement interface ' . FileListEditIconHookInterface::class,
1454  1235225797
1455  );
1456  }
1457  $hookObject->manipulateEditIcons($cells, $this);
1458  }
1459  unset($cells['__fileOrFolderObject']);
1460  // Compile items into a DIV-element:
1461  return '<div class="btn-group">' . implode('', $cells) . '</div>';
1462  }
1463 
1470  public function ‪makeRef($fileOrFolderObject)
1471  {
1472  if ($fileOrFolderObject instanceof FolderInterface) {
1473  return '-';
1474  }
1475  // Look up the file in the sys_refindex.
1476  // Exclude sys_file_metadata records as these are no use references
1477  $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('sys_refindex');
1478  $referenceCount = $queryBuilder->count('*')
1479  ->from('sys_refindex')
1480  ->where(
1481  $queryBuilder->expr()->eq('deleted', $queryBuilder->createNamedParameter(0, \PDO::PARAM_INT)),
1482  $queryBuilder->expr()->eq(
1483  'ref_table',
1484  $queryBuilder->createNamedParameter('sys_file', \PDO::PARAM_STR)
1485  ),
1486  $queryBuilder->expr()->eq(
1487  'ref_uid',
1488  $queryBuilder->createNamedParameter($fileOrFolderObject->getUid(), \PDO::PARAM_INT)
1489  ),
1490  $queryBuilder->expr()->neq(
1491  'tablename',
1492  $queryBuilder->createNamedParameter('sys_file_metadata', \PDO::PARAM_STR)
1493  )
1494  )
1495  ->execute()
1496  ->fetchColumn();
1497 
1498  return $this->‪generateReferenceToolTip($referenceCount, '\'_FILE\', ' . GeneralUtility::quoteJSvalue($fileOrFolderObject->getCombinedIdentifier()));
1499  }
1500 
1506  protected function ‪getLanguageService()
1507  {
1508  return ‪$GLOBALS['LANG'];
1509  }
1510 
1516  protected function ‪getBackendUser()
1517  {
1518  return ‪$GLOBALS['BE_USER'];
1519  }
1520 
1524  protected function ‪determineScriptUrl()
1525  {
1526  if ($routePath = GeneralUtility::_GP('route')) {
1527  $uriBuilder = GeneralUtility::makeInstance(UriBuilder::class);
1528  $this->thisScript = (string)$uriBuilder->buildUriFromRoutePath($routePath);
1529  } else {
1530  $this->thisScript = GeneralUtility::getIndpEnv('SCRIPT_NAME');
1531  }
1532  }
1533 
1537  protected function ‪getThisScript()
1538  {
1539  return strpos($this->thisScript, '?') === false ? $this->thisScript . '?' : $this->thisScript . '&';
1540  }
1541 
1547  protected function ‪getTranslateTools()
1548  {
1549  if (!isset($this->translateTools)) {
1550  $this->translateTools = GeneralUtility::makeInstance(TranslationConfigurationProvider::class);
1551  }
1552  return ‪$this->translateTools;
1553  }
1554 
1563  protected function ‪generateReferenceToolTip($references, $launchViewParameter = '')
1564  {
1565  if (!$references) {
1566  $htmlCode = '-';
1567  } else {
1568  $htmlCode = '<a href="#"';
1569  if ($launchViewParameter !== '') {
1570  $htmlCode .= ' onclick="' . htmlspecialchars(
1571  'top.TYPO3.InfoWindow.showItem(' . $launchViewParameter . '); return false;'
1572  ) . '"';
1573  }
1574  $htmlCode .= ' title="' . htmlspecialchars(
1575  $this->‪getLanguageService()->sL(
1576  'LLL:EXT:backend/Resources/Private/Language/locallang.xlf:show_references'
1577  ) . ' (' . $references . ')'
1578  ) . '">';
1579  $htmlCode .= $references;
1580  $htmlCode .= '</a>';
1581  }
1582  return $htmlCode;
1583  }
1584 }
‪TYPO3\CMS\Filelist\FileList\formatFileList
‪string formatFileList(array $files)
Definition: FileList.php:984
‪TYPO3\CMS\Filelist\FileList\$addElement_tdCssClass
‪array $addElement_tdCssClass
Definition: FileList.php:204
‪TYPO3\CMS\Filelist\FileList\listURL
‪string listURL($altId='', $table='-1', $exclList='')
Definition: FileList.php:970
‪TYPO3\CMS\Core\Imaging\Icon\SIZE_SMALL
‪const SIZE_SMALL
Definition: Icon.php:29
‪TYPO3\CMS\Filelist\Configuration\ThumbnailConfiguration
Definition: ThumbnailConfiguration.php:26
‪TYPO3\CMS\Core\Localization\LanguageService\includeLLFile
‪mixed includeLLFile($fileRef, $setGlobal=true, $mergeLocalOntoDefault=false)
Definition: LanguageService.php:260
‪TYPO3\CMS\Core\Resource\ProcessedFile\CONTEXT_IMAGEPREVIEW
‪const CONTEXT_IMAGEPREVIEW
Definition: ProcessedFile.php:50
‪TYPO3\CMS\Filelist\FileList\getBackendUser
‪TYPO3 CMS Core Authentication BackendUserAuthentication getBackendUser()
Definition: FileList.php:1478
‪TYPO3\CMS\Filelist\FileList\$totalItems
‪string $totalItems
Definition: FileList.php:132
‪TYPO3\CMS\Backend\Utility\BackendUtility\getLinkToDataHandlerAction
‪static string getLinkToDataHandlerAction($parameters, $redirectUrl='')
Definition: BackendUtility.php:2788
‪TYPO3\CMS\Core\Resource\Exception\InsufficientFolderAccessPermissionsException
Definition: InsufficientFolderAccessPermissionsException.php:21
‪TYPO3\CMS\Filelist\FileList\$translateTools
‪TranslationConfigurationProvider $translateTools
Definition: FileList.php:184
‪TYPO3\CMS\Filelist\FileList\$path
‪string $path
Definition: FileList.php:120
‪TYPO3\CMS\Filelist\FileList\makeRef
‪string makeRef($fileOrFolderObject)
Definition: FileList.php:1432
‪TYPO3\CMS\Filelist\FileList\$spaceIcon
‪string $spaceIcon
Definition: FileList.php:64
‪TYPO3\CMS\Backend\Clipboard\Clipboard
Definition: Clipboard.php:38
‪TYPO3\CMS\Core\Resource\File\isIndexed
‪bool null isIndexed()
Definition: File.php:168
‪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\Filelist\FileList\$iLimit
‪int $iLimit
Definition: FileList.php:52
‪TYPO3\CMS\Filelist\FileList\$languageIconTitles
‪array $languageIconTitles
Definition: FileList.php:162
‪TYPO3\CMS\Filelist\FileList\$setLMargin
‪int $setLMargin
Definition: FileList.php:144
‪TYPO3
‪TYPO3\CMS\Filelist\FileList\getLinkToParentFolder
‪string getLinkToParentFolder(Folder $currentFolder)
Definition: FileList.php:790
‪TYPO3\CMS\Filelist\FileList\injectResourceFactory
‪injectResourceFactory(ResourceFactory $resourceFactory)
Definition: FileList.php:264
‪TYPO3\CMS\Core\Utility\MathUtility\forceIntegerInRange
‪static int forceIntegerInRange($theInt, $min, $max=2000000000, $defaultValue=0)
Definition: MathUtility.php:31
‪TYPO3\CMS\Filelist\FileList\$resourceFactory
‪ResourceFactory $resourceFactory
Definition: FileList.php:220
‪TYPO3\CMS\Filelist\FileList\writeTop
‪writeTop()
Definition: FileList.php:615
‪TYPO3\CMS\Filelist\FileList\fwd_rwd_nav
‪array fwd_rwd_nav($table='')
Definition: FileList.php:625
‪TYPO3\CMS\Core\Resource\Folder\getFileCount
‪int getFileCount(array $filterMethods=[], $recursive=false)
Definition: Folder.php:258
‪TYPO3\CMS\Filelist\FileList\$dirs
‪array $dirs
Definition: FileList.php:112
‪TYPO3\CMS\Filelist\FileList\$thisScript
‪string $thisScript
Definition: FileList.php:168
‪TYPO3\CMS\Filelist\FileList\$counter
‪int $counter
Definition: FileList.php:156
‪TYPO3\CMS\Core\Resource\Folder\getRole
‪int getRole()
Definition: Folder.php:519
‪TYPO3\CMS\Core\Resource\Folder\FILTER_MODE_USE_OWN_AND_STORAGE_FILTERS
‪const FILTER_MODE_USE_OWN_AND_STORAGE_FILTERS
Definition: Folder.php:66
‪TYPO3\CMS\Core\Resource\ResourceFactory\getInstance
‪static ResourceFactory getInstance()
Definition: ResourceFactory.php:39
‪TYPO3\CMS\Core\Resource\Folder\getParentFolder
‪Folder getParentFolder()
Definition: Folder.php:533
‪TYPO3\CMS\Core\Database\Query\Restriction\BackendWorkspaceRestriction
Definition: BackendWorkspaceRestriction.php:28
‪TYPO3\CMS\Filelist\FileList\fwd_rwd_HTML
‪string fwd_rwd_HTML($type, $pointer, $table='')
Definition: FileList.php:657
‪TYPO3\CMS\Filelist\FileList\initializeLanguages
‪initializeLanguages()
Definition: FileList.php:722
‪TYPO3\CMS\Core\Imaging\IconFactory
Definition: IconFactory.php:31
‪TYPO3\CMS\Filelist\FileList\languageFlag
‪string languageFlag($sys_language_uid, $addAsAdditionalText=true)
Definition: FileList.php:765
‪TYPO3\CMS\Filelist\FileList\formatDirList
‪string formatDirList(array $folders)
Definition: FileList.php:830
‪TYPO3\CMS\Filelist\FileList\$clipObj
‪Clipboard $clipObj
Definition: FileList.php:216
‪TYPO3\CMS\Filelist\FileList\$thumbs
‪bool $thumbs
Definition: FileList.php:58
‪TYPO3\CMS\Backend\Utility\BackendUtility\referenceCount
‪static string referenceCount($table, $ref, $msg='', $count=null)
Definition: BackendUtility.php:3787
‪TYPO3\CMS\Core\Localization\LanguageService\sL
‪string sL($input)
Definition: LanguageService.php:158
‪TYPO3\CMS\Core\Resource\Utility\ListUtility
Definition: ListUtility.php:24
‪TYPO3\CMS\Filelist\FileList\getTable
‪string getTable($rowlist)
Definition: FileList.php:344
‪TYPO3\CMS\Filelist\FileList\$pageOverlays
‪array $pageOverlays
Definition: FileList.php:150
‪$fields
‪$fields
Definition: pages.php:4
‪TYPO3\CMS\Filelist\FileList\$sortRev
‪bool $sortRev
Definition: FileList.php:82
‪TYPO3\CMS\Filelist
‪TYPO3\CMS\Filelist\FileList\makeClip
‪string makeClip($fileOrFolderObject)
Definition: FileList.php:1205
‪TYPO3\CMS\Filelist\FileList\$CBnames
‪array $CBnames
Definition: FileList.php:212
‪TYPO3\CMS\Filelist\FileList\$totalbytes
‪int $totalbytes
Definition: FileList.php:108
‪TYPO3\CMS\Filelist\FileList\$folderObject
‪Folder $folderObject
Definition: FileList.php:208
‪TYPO3\CMS\Filelist\FileList\CBfunctions
‪string CBfunctions()
Definition: FileList.php:685
‪TYPO3\CMS\Filelist\FileList\$eCounter
‪int $eCounter
Definition: FileList.php:180
‪TYPO3\CMS\Core\Type\Bitmask\JsConfirmation\DELETE
‪const DELETE
Definition: JsConfirmation.php:38
‪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\Filelist\FileList\$fileListController
‪FileListController $fileListController
Definition: FileList.php:233
‪TYPO3\CMS\Filelist\FileList\generateReferenceToolTip
‪string generateReferenceToolTip($references, $launchViewParameter='')
Definition: FileList.php:1525
‪TYPO3\CMS\Core\Resource\InaccessibleFolder
Definition: InaccessibleFolder.php:26
‪TYPO3\CMS\Core\Resource\File\_getMetaData
‪array _getMetaData()
Definition: File.php:114
‪TYPO3\CMS\Core\Resource\Folder\getModificationTime
‪int getModificationTime()
Definition: Folder.php:543
‪TYPO3\CMS\Filelist\FileList\__construct
‪__construct(FileListController $fileListController=null)
Definition: FileList.php:244
‪TYPO3\CMS\Filelist\FileList
Definition: FileList.php:47
‪TYPO3\CMS\Filelist\Controller\FileListController
Definition: FileListController.php:50
‪TYPO3\CMS\Filelist\FileList\$bigControlPanel
‪bool $bigControlPanel
Definition: FileList.php:94
‪TYPO3\CMS\Backend\Routing\UriBuilder
Definition: UriBuilder.php:35
‪TYPO3\CMS\Core\Resource\Folder
Definition: Folder.php:34
‪TYPO3\CMS\Core\Resource\ResourceFactory
Definition: ResourceFactory.php:33
‪TYPO3\CMS\Filelist\FileList\$fixedL
‪int $fixedL
Definition: FileList.php:70
‪TYPO3\CMS\Core\Resource\File
Definition: File.php:23
‪TYPO3\CMS\Core\Resource\ResourceStorage\isWithinFolder
‪bool isWithinFolder(Folder $folder, ResourceInterface $resource)
Definition: ResourceStorage.php:2517
‪TYPO3\CMS\Filelist\FileList\isImage
‪bool isImage($ext)
Definition: FileList.php:1157
‪TYPO3\CMS\Core\Resource\Folder\checkActionPermission
‪bool checkActionPermission($action)
Definition: Folder.php:420
‪TYPO3\CMS\Filelist\FileList\linkWrapFile
‪string linkWrapFile($code, File $fileObject)
Definition: FileList.php:934
‪TYPO3\CMS\Filelist\FileList\linkClipboardHeaderIcon
‪string linkClipboardHeaderIcon($string, $_, $cmd, $warning='')
Definition: FileList.php:315
‪TYPO3\CMS\Filelist\FileList\getLanguageService
‪TYPO3 CMS Core Localization LanguageService getLanguageService()
Definition: FileList.php:1468
‪TYPO3\CMS\Filelist\FileList\isMediaFile
‪bool isMediaFile($ext)
Definition: FileList.php:1168
‪TYPO3\CMS\Filelist\FileList\$fieldArray
‪array $fieldArray
Definition: FileList.php:138
‪TYPO3\CMS\Filelist\FileList\addElement
‪string addElement($h, $icon, $data, $rowParams='', $_='', $_2='', $colType='td')
Definition: FileList.php:533
‪TYPO3\CMS\Core\Resource\FolderInterface\ROLE_PROCESSING
‪const ROLE_PROCESSING
Definition: FolderInterface.php:27
‪TYPO3\CMS\Filelist\FileList\$HTMLcode
‪string $HTMLcode
Definition: FileList.php:104
‪TYPO3\CMS\Filelist\FileList\getThisScript
‪string getThisScript()
Definition: FileList.php:1499
‪TYPO3\CMS\Filelist\FileList\generateList
‪generateList()
Definition: FileList.php:301
‪TYPO3\CMS\Backend\Utility\BackendUtility
Definition: BackendUtility.php:72
‪TYPO3\CMS\Filelist\FileList\$firstElementNumber
‪int $firstElementNumber
Definition: FileList.php:86
‪TYPO3\CMS\Core\Resource\File\checkActionPermission
‪bool checkActionPermission($action)
Definition: File.php:262
‪TYPO3\CMS\Filelist\FileList\linkWrapSort
‪string linkWrapSort($code, $folderIdentifier, $col)
Definition: FileList.php:1181
‪TYPO3\CMS\Core\Resource\ProcessedFile
Definition: ProcessedFile.php:42
‪TYPO3\CMS\Filelist\FileList\getFolderInfo
‪string getFolderInfo()
Definition: FileList.php:814
‪TYPO3\CMS\Filelist\FileList\$JScode
‪string $JScode
Definition: FileList.php:98
‪TYPO3\CMS\Filelist\FileList\$leftMargin
‪int $leftMargin
Definition: FileList.php:126
‪TYPO3\CMS\Core\Messaging\AbstractMessage\INFO
‪const INFO
Definition: AbstractMessage.php:26
‪TYPO3\CMS\Backend\Configuration\TranslationConfigurationProvider
Definition: TranslationConfigurationProvider.php:35
‪TYPO3\CMS\Backend\Configuration\TranslationConfigurationProvider\getSystemLanguages
‪array getSystemLanguages($pageId=0)
Definition: TranslationConfigurationProvider.php:51
‪TYPO3\CMS\Core\Messaging\FlashMessage
Definition: FlashMessage.php:22
‪TYPO3\CMS\Core\Resource\Folder\getReadablePath
‪string getReadablePath($rootId=null)
Definition: Folder.php:103
‪TYPO3\CMS\Filelist\FileList\$thumbnailConfiguration
‪ThumbnailConfiguration $thumbnailConfiguration
Definition: FileList.php:237
‪TYPO3\CMS\Filelist\FileList\getTranslateTools
‪TranslationConfigurationProvider getTranslateTools()
Definition: FileList.php:1509
‪$GLOBALS
‪$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['adminpanel']['modules']
Definition: ext_localconf.php:5
‪TYPO3\CMS\Core\Database\Query\Restriction\DeletedRestriction
Definition: DeletedRestriction.php:26
‪TYPO3\CMS\Filelist\FileList\$showIcon
‪int $showIcon
Definition: FileList.php:198
‪TYPO3\CMS\Filelist\FileList\getTranslationsForMetaData
‪array getTranslationsForMetaData($metaDataRecord)
Definition: FileList.php:1125
‪TYPO3\CMS\Filelist\FileList\$files
‪array $files
Definition: FileList.php:116
‪TYPO3\CMS\Core\Resource\FolderInterface
Definition: FolderInterface.php:21
‪TYPO3\CMS\Core\Utility\MathUtility
Definition: MathUtility.php:21
‪TYPO3\CMS\Filelist\FileList\determineScriptUrl
‪determineScriptUrl()
Definition: FileList.php:1486
‪TYPO3\CMS\Core\Resource\Folder\getIdentifier
‪string getIdentifier()
Definition: Folder.php:157
‪TYPO3\CMS\Filelist\FileList\$addElement_tdParams
‪array $addElement_tdParams
Definition: FileList.php:190
‪TYPO3\CMS\Core\Resource\Folder\getCombinedIdentifier
‪string getCombinedIdentifier()
Definition: Folder.php:178
‪TYPO3\CMS\Core\Database\ConnectionPool
Definition: ConnectionPool.php:44
‪TYPO3\CMS\Core\Utility\GeneralUtility
Definition: GeneralUtility.php:45
‪TYPO3\CMS\Filelist\FileList\$oddColumnsCssClass
‪string $oddColumnsCssClass
Definition: FileList.php:174
‪TYPO3\CMS\Filelist\FileList\$clipBoard
‪bool $clipBoard
Definition: FileList.php:90
‪TYPO3\CMS\Backend\Utility\BackendUtility\date
‪static string date($tstamp)
Definition: BackendUtility.php:1179
‪TYPO3\CMS\Filelist\FileList\$sort
‪string $sort
Definition: FileList.php:76
‪TYPO3\CMS\Core\Resource\Utility\ListUtility\resolveSpecialFolderNames
‪static array resolveSpecialFolderNames(array $folders)
Definition: ListUtility.php:31
‪TYPO3\CMS\Core\Type\Bitmask\JsConfirmation
Definition: JsConfirmation.php:24
‪TYPO3\CMS\Core\Messaging\FlashMessageService
Definition: FlashMessageService.php:25
‪TYPO3\CMS\Filelist\FileList\linkWrapDir
‪string linkWrapDir($title, Folder $folderObject)
Definition: FileList.php:914
‪TYPO3\CMS\Filelist\FileListEditIconHookInterface
Definition: FileListEditIconHookInterface.php:21
‪TYPO3\CMS\Filelist\FileList\$id
‪int $id
Definition: FileList.php:228
‪TYPO3\CMS\Filelist\FileList\$no_noWrap
‪int $no_noWrap
Definition: FileList.php:194
‪TYPO3\CMS\Filelist\FileList\makeEdit
‪string makeEdit($fileOrFolderObject)
Definition: FileList.php:1292
‪TYPO3\CMS\Filelist\FileList\start
‪start(Folder $folderObject, $pointer, $sort, $sortRev, $clipBoard=false, $bigControlPanel=false)
Definition: FileList.php:279
‪TYPO3\CMS\Filelist\FileList\$iconFactory
‪IconFactory $iconFactory
Definition: FileList.php:224