TYPO3 CMS  TYPO3_7-6
TYPO3\CMS\Filelist\FileList Class Reference
Inheritance diagram for TYPO3\CMS\Filelist\FileList:
TYPO3\CMS\Backend\RecordList\AbstractRecordList

Public Member Functions

 injectResourceFactory (ResourceFactory $resourceFactory)
 
 __construct (FileListController $fileListController)
 
 start (Folder $folderObject, $pointer, $sort, $sortRev, $clipBoard=false, $bigControlPanel=false)
 
 generateList ()
 
 getButtonsAndOtherMarkers (Folder $folderObject)
 
 linkClipboardHeaderIcon ($string, $_, $cmd, $warning='')
 
 getFolderInfo ()
 
 formatDirList (array $folders)
 
 linkWrapDir ($title, Folder $folderObject)
 
 linkWrapFile ($code, File $fileObject)
 
 listURL ($altId='', $table='-1', $exclList='')
 
 formatFileList (array $files)
 
 isImage ($ext)
 
 isMediaFile ($ext)
 
 linkWrapSort ($code, $folderIdentifier, $col)
 
 makeClip ($fileOrFolderObject)
 
 makeEdit ($fileOrFolderObject)
 
 makeRef ($fileOrFolderObject)
 
- Public Member Functions inherited from TYPO3\CMS\Backend\RecordList\AbstractRecordList
 __construct ()
 
 addElement ($h, $icon, $data, $rowParams='', $_='', $_2='', $colType='td')
 
 writeTop ()
 
 fwd_rwd_nav ($table='')
 
 fwd_rwd_HTML ($type, $pointer, $table='')
 
 listURL ($altId='', $table='-1', $exclList='')
 
 CBfunctions ()
 
 initializeLanguages ()
 
 languageFlag ($sys_language_uid, $addAsAdditionalText=true)
 

Public Attributes

 $iLimit = 40
 
 $thumbs = false
 
 $spaceIcon
 
 $fixedL = 30
 
 $clickMenus = 1
 
 $sort = ''
 
 $sortRev = 1
 
 $firstElementNumber = 0
 
 $clipBoard = 0
 
 $bigControlPanel = 0
 
 $JScode = ''
 
 $HTMLcode = ''
 
 $totalbytes = 0
 
 $dirs = []
 
 $files = []
 
 $path = ''
 
 $eCounter = 0
 
 $totalItems = ''
 
 $CBnames = []
 
 $clipObj
 
- Public Attributes inherited from TYPO3\CMS\Backend\RecordList\AbstractRecordList
 $iLimit = 10
 
 $leftMargin = 0
 
 $showIcon = 1
 
 $no_noWrap = 0
 
 $oddColumnsCssClass = ''
 
 $fieldArray = []
 
 $addElement_tdParams = []
 
 $addElement_tdCssClass = []
 
 $fixedL = 30
 
 $thisScript = ''
 
 $setLMargin = 1
 
 $counter = 0
 
 $totalItems = ''
 
 $firstElementNumber = 0
 
 $eCounter = 0
 
 $HTMLcode = ''
 
 $pageOverlays = []
 
 $languageIconTitles = []
 
 $translateTools
 

Protected Member Functions

 getLinkToParentFolder (Folder $currentFolder)
 
 getTranslationsForMetaData ($metaDataRecord)
 
 getDatabaseConnection ()
 
 getLanguageService ()
 
 getBackendUser ()
 
- Protected Member Functions inherited from TYPO3\CMS\Backend\RecordList\AbstractRecordList
 determineScriptUrl ()
 
 getThisScript ()
 
 getTranslateTools ()
 
 generateReferenceToolTip ($references, $launchViewParameter='')
 
 getLanguageService ()
 
 getDatabaseConnection ()
 

Protected Attributes

 $folderObject
 
 $resourceFactory
 
 $iconFactory
 
 $fileListController
 
- Protected Attributes inherited from TYPO3\CMS\Backend\RecordList\AbstractRecordList
 $id = 0
 
 $iconFactory
 

Detailed Description

Class for rendering of File>Filelist

Definition at line 41 of file FileList.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Filelist\FileList::__construct ( FileListController  $fileListController)

Construct

Parameters
FileListController$fileListController

Definition at line 192 of file FileList.php.

References TYPO3\CMS\Filelist\FileList\$fileListController, and TYPO3\CMS\Core\Utility\GeneralUtility\makeInstance().

Member Function Documentation

◆ formatDirList()

◆ formatFileList()

◆ generateList()

TYPO3\CMS\Filelist\FileList::generateList ( )

Reading files and directories, counting elements and generating the list in ->HTMLcode

Returns
void

Definition at line 234 of file FileList.php.

◆ getBackendUser()

TYPO3\CMS\Filelist\FileList::getBackendUser ( )
protected

◆ getButtonsAndOtherMarkers()

◆ getDatabaseConnection()

TYPO3\CMS\Filelist\FileList::getDatabaseConnection ( )
protected

Returns the database connection

Returns
DatabaseConnection

Definition at line 1134 of file FileList.php.

References $GLOBALS.

Referenced by TYPO3\CMS\Filelist\FileList\getTranslationsForMetaData(), and TYPO3\CMS\Filelist\FileList\makeRef().

◆ getFolderInfo()

TYPO3\CMS\Filelist\FileList::getFolderInfo ( )

Gets the number of files and total size of a folder

Returns
string

Definition at line 536 of file FileList.php.

References TYPO3\CMS\Core\Utility\GeneralUtility\formatSize(), and TYPO3\CMS\Filelist\FileList\getLanguageService().

◆ getLanguageService()

◆ getLinkToParentFolder()

TYPO3\CMS\Filelist\FileList::getLinkToParentFolder ( Folder  $currentFolder)
protected

If there is a parent folder and user has access to it, return an icon which is linked to the filelist of the parent folder.

Parameters
Folder$currentFolder
Returns
string

Definition at line 512 of file FileList.php.

References TYPO3\CMS\Core\Resource\Folder\getIdentifier(), TYPO3\CMS\Filelist\FileList\getLanguageService(), TYPO3\CMS\Core\Resource\Folder\getParentFolder(), TYPO3\CMS\Core\Resource\Folder\getStorage(), TYPO3\CMS\Filelist\FileList\linkWrapDir(), and TYPO3\CMS\Core\Imaging\Icon\SIZE_SMALL.

Referenced by TYPO3\CMS\Filelist\FileList\getButtonsAndOtherMarkers().

◆ getTranslationsForMetaData()

TYPO3\CMS\Filelist\FileList::getTranslationsForMetaData (   $metaDataRecord)
protected

Fetch the translations for a sys_file_metadata record

Parameters
$metaDataRecord
Returns
array keys are the sys_language uids, values are the $rows

Definition at line 839 of file FileList.php.

References $GLOBALS, and TYPO3\CMS\Filelist\FileList\getDatabaseConnection().

Referenced by TYPO3\CMS\Filelist\FileList\formatFileList().

◆ injectResourceFactory()

TYPO3\CMS\Filelist\FileList::injectResourceFactory ( ResourceFactory  $resourceFactory)
Parameters
ResourceFactory$resourceFactory

Definition at line 172 of file FileList.php.

References TYPO3\CMS\Filelist\FileList\$resourceFactory.

◆ isImage()

TYPO3\CMS\Filelist\FileList::isImage (   $ext)

Returns TRUE if $ext is an image-extension according to $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext']

Parameters
string$extFile extension
Returns
bool

Definition at line 857 of file FileList.php.

References $GLOBALS, and TYPO3\CMS\Core\Utility\GeneralUtility\inList().

Referenced by TYPO3\CMS\Filelist\FileList\formatFileList().

◆ isMediaFile()

TYPO3\CMS\Filelist\FileList::isMediaFile (   $ext)

Returns TRUE if $ext is an media-extension according to $GLOBALS['TYPO3_CONF_VARS']['SYS']['mediafile_ext']

Parameters
string$extFile extension
Returns
bool

Definition at line 868 of file FileList.php.

References $GLOBALS, and TYPO3\CMS\Core\Utility\GeneralUtility\inList().

Referenced by TYPO3\CMS\Filelist\FileList\formatFileList().

◆ linkClipboardHeaderIcon()

◆ linkWrapDir()

TYPO3\CMS\Filelist\FileList::linkWrapDir (   $title,
Folder  $folderObject 
)

Wraps the directory-titles

Parameters
string$titleString to be wrapped in links
Folder$folderObjectFolder to work on
Returns
string HTML

Definition at line 636 of file FileList.php.

References TYPO3\CMS\Core\Utility\GeneralUtility\fixed_lgd_cs(), TYPO3\CMS\Core\Resource\Folder\getCombinedIdentifier(), and TYPO3\CMS\Core\Utility\GeneralUtility\md5int().

Referenced by TYPO3\CMS\Filelist\FileList\formatDirList(), and TYPO3\CMS\Filelist\FileList\getLinkToParentFolder().

◆ linkWrapFile()

TYPO3\CMS\Filelist\FileList::linkWrapFile (   $code,
File  $fileObject 
)

◆ linkWrapSort()

TYPO3\CMS\Filelist\FileList::linkWrapSort (   $code,
  $folderIdentifier,
  $col 
)

Wraps the directory-titles ($code) in a link to filelist/Modules/Filelist/index.php (id=$path) and sorting commands...

Parameters
string$codeString to be wrapped
string$folderIdentifierID (path)
string$colSorting column
Returns
string HTML

Definition at line 881 of file FileList.php.

References $params, and TYPO3\CMS\Core\Imaging\Icon\SIZE_SMALL.

Referenced by TYPO3\CMS\Filelist\FileList\linkClipboardHeaderIcon().

◆ listURL()

TYPO3\CMS\Filelist\FileList::listURL (   $altId = '',
  $table = '-1',
  $exclList = '' 
)

Returns list URL; This is the URL of the current script with id and imagemode parameters, that's all. The URL however is not relative, otherwise GeneralUtility::sanitizeLocalUrl() would say that the URL would be invalid

Parameters
string$altId
string$tableTable name to display. Enter "-1" for the current table.
string$exclListComma separated list of fields NOT to include ("sortField", "sortRev" or "firstElementNumber")
Returns
string URL

Definition at line 689 of file FileList.php.

References TYPO3\CMS\Core\Utility\GeneralUtility\linkThisScript().

Referenced by TYPO3\CMS\Filelist\FileList\formatFileList(), TYPO3\CMS\Filelist\FileList\getButtonsAndOtherMarkers(), and TYPO3\CMS\Filelist\FileList\linkWrapFile().

◆ makeClip()

TYPO3\CMS\Filelist\FileList::makeClip (   $fileOrFolderObject)

Creates the clipboard control pad

Parameters
File | Folder$fileOrFolderObjectArray with information about the file/directory for which to make the clipboard panel for the listing.
Returns
string HTML-table

Definition at line 903 of file FileList.php.

References TYPO3\CMS\Filelist\FileList\$spaceIcon, TYPO3\CMS\Core\Resource\Folder\checkActionPermission(), TYPO3\CMS\Filelist\FileList\getLanguageService(), TYPO3\CMS\Core\Resource\Folder\getStorage(), and TYPO3\CMS\Core\Imaging\Icon\SIZE_SMALL.

Referenced by TYPO3\CMS\Filelist\FileList\formatDirList(), and TYPO3\CMS\Filelist\FileList\formatFileList().

◆ makeEdit()

◆ makeRef()

TYPO3\CMS\Filelist\FileList::makeRef (   $fileOrFolderObject)

Make reference count

Parameters
File | Folder$fileOrFolderObjectArray with information about the file/directory for which to make the clipboard panel for the listing.
Returns
string HTML

Definition at line 1109 of file FileList.php.

References TYPO3\CMS\Backend\RecordList\AbstractRecordList\generateReferenceToolTip(), TYPO3\CMS\Filelist\FileList\getDatabaseConnection(), and TYPO3\CMS\Core\Utility\GeneralUtility\quoteJSvalue().

Referenced by TYPO3\CMS\Filelist\FileList\formatDirList(), and TYPO3\CMS\Filelist\FileList\formatFileList().

◆ start()

TYPO3\CMS\Filelist\FileList::start ( Folder  $folderObject,
  $pointer,
  $sort,
  $sortRev,
  $clipBoard = false,
  $bigControlPanel = false 
)

Initialization of class

Parameters
Folder$folderObjectThe folder to work on
int$pointerPointer
bool$sortSorting column
bool$sortRevSorting direction
bool$clipBoard
bool$bigControlPanelShow clipboard flag
Returns
void

Definition at line 210 of file FileList.php.

References TYPO3\CMS\Filelist\FileList\$bigControlPanel, TYPO3\CMS\Filelist\FileList\$clipBoard, TYPO3\CMS\Filelist\FileList\$folderObject, TYPO3\CMS\Filelist\FileList\$sort, TYPO3\CMS\Filelist\FileList\$sortRev, TYPO3\CMS\Filelist\FileList\getBackendUser(), TYPO3\CMS\Core\Resource\ResourceFactory\getInstance(), TYPO3\CMS\Filelist\FileList\getLanguageService(), and TYPO3\CMS\Core\Resource\Folder\getReadablePath().

Member Data Documentation

◆ $bigControlPanel

TYPO3\CMS\Filelist\FileList::$bigControlPanel = 0

Definition at line 105 of file FileList.php.

Referenced by TYPO3\CMS\Filelist\FileList\start().

◆ $CBnames

TYPO3\CMS\Filelist\FileList::$CBnames = []

Definition at line 157 of file FileList.php.

◆ $clickMenus

TYPO3\CMS\Filelist\FileList::$clickMenus = 1

Definition at line 76 of file FileList.php.

◆ $clipBoard

TYPO3\CMS\Filelist\FileList::$clipBoard = 0

Definition at line 100 of file FileList.php.

Referenced by TYPO3\CMS\Filelist\FileList\start().

◆ $clipObj

Clipboard TYPO3\CMS\Filelist\FileList::$clipObj

Definition at line 162 of file FileList.php.

◆ $dirs

TYPO3\CMS\Filelist\FileList::$dirs = []

Definition at line 125 of file FileList.php.

◆ $eCounter

TYPO3\CMS\Filelist\FileList::$eCounter = 0

Definition at line 147 of file FileList.php.

◆ $fileListController

TYPO3\CMS\Filelist\FileList::$fileListController
protected

Definition at line 185 of file FileList.php.

Referenced by TYPO3\CMS\Filelist\FileList\__construct().

◆ $files

TYPO3\CMS\Filelist\FileList::$files = []

Definition at line 130 of file FileList.php.

Referenced by TYPO3\CMS\Filelist\FileList\linkClipboardHeaderIcon().

◆ $firstElementNumber

TYPO3\CMS\Filelist\FileList::$firstElementNumber = 0

Definition at line 95 of file FileList.php.

Referenced by TYPO3\CMS\Filelist\FileList\linkClipboardHeaderIcon().

◆ $fixedL

TYPO3\CMS\Filelist\FileList::$fixedL = 30

Definition at line 69 of file FileList.php.

Referenced by TYPO3\CMS\Filelist\FileList\formatFileList().

◆ $folderObject

TYPO3\CMS\Filelist\FileList::$folderObject
protected

◆ $HTMLcode

TYPO3\CMS\Filelist\FileList::$HTMLcode = ''

Definition at line 115 of file FileList.php.

◆ $iconFactory

TYPO3\CMS\Filelist\FileList::$iconFactory
protected

Definition at line 180 of file FileList.php.

◆ $iLimit

TYPO3\CMS\Filelist\FileList::$iLimit = 40

Definition at line 48 of file FileList.php.

Referenced by TYPO3\CMS\Filelist\FileList\linkClipboardHeaderIcon().

◆ $JScode

TYPO3\CMS\Filelist\FileList::$JScode = ''

Definition at line 110 of file FileList.php.

◆ $path

TYPO3\CMS\Filelist\FileList::$path = ''

Definition at line 135 of file FileList.php.

◆ $resourceFactory

TYPO3\CMS\Filelist\FileList::$resourceFactory
protected

Definition at line 167 of file FileList.php.

Referenced by TYPO3\CMS\Filelist\FileList\injectResourceFactory().

◆ $sort

TYPO3\CMS\Filelist\FileList::$sort = ''

Definition at line 83 of file FileList.php.

Referenced by TYPO3\CMS\Filelist\FileList\start().

◆ $sortRev

TYPO3\CMS\Filelist\FileList::$sortRev = 1

Definition at line 90 of file FileList.php.

Referenced by TYPO3\CMS\Filelist\FileList\start().

◆ $spaceIcon

TYPO3\CMS\Filelist\FileList::$spaceIcon

◆ $thumbs

TYPO3\CMS\Filelist\FileList::$thumbs = false

Definition at line 55 of file FileList.php.

◆ $totalbytes

TYPO3\CMS\Filelist\FileList::$totalbytes = 0

Definition at line 120 of file FileList.php.

◆ $totalItems

TYPO3\CMS\Filelist\FileList::$totalItems = ''

Definition at line 152 of file FileList.php.