TYPO3 CMS  TYPO3_6-2
TYPO3\CMS\Filelist\FileList Class Reference
Inheritance diagram for TYPO3\CMS\Filelist\FileList:
TYPO3\CMS\Backend\RecordList\AbstractRecordList fileList

Public Member Functions

 injectResourceFactory (ResourceFactory $resourceFactory)
 
 start (\TYPO3\CMS\Core\Resource\Folder $folderObject, $pointer, $sort, $sortRev, $clipBoard=FALSE, $bigControlPanel=FALSE)
 
 generateList ()
 
 getButtonsAndOtherMarkers (\TYPO3\CMS\Core\Resource\Folder $folderObject)
 
 linkClipboardHeaderIcon ($string, $table, $cmd, $warning='')
 
 getFolderInfo ()
 
 formatDirList (array $folders)
 
 linkWrapDir ($title, \TYPO3\CMS\Core\Resource\Folder $folderObject)
 
 linkWrapFile ($code, \TYPO3\CMS\Core\Resource\File $fileObject)
 
 listURL ()
 
 dirData (\TYPO3\CMS\Core\Resource\Folder $folderObject)
 
 formatFileList (array $files)
 
 isImage ($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, $trParams='', $lMargin='', $altLine='')
 
 writeTop ()
 
 writeBottom ()
 
 fwd_rwd_nav ($table='')
 
 fwd_rwd_HTML ($type, $pointer, $table='')
 
 listURL ($altId='')
 
 CBfunctions ()
 
 initializeLanguages ()
 
 languageFlag ($sys_language_uid, $addAsAdditionalText=TRUE)
 

Public Attributes

 $iLimit = 40
 
 $thumbs = 0
 
 $widthGif = '<img src="clear.gif" width="1" height="1" hspace="165" alt="" />'
 
 $fixedL = 30
 
 $script = ''
 
 $clickMenus = 1
 
 $sort = ''
 
 $sortRev = 1
 
 $firstElementNumber = 0
 
 $clipBoard = 0
 
 $bigControlPanel = 0
 
 $JScode = ''
 
 $HTMLcode = ''
 
 $totalbytes = 0
 
 $dirs = array()
 
 $files = array()
 
 $path = ''
 
 $eCounter = 0
 
 $dirCounter = 0
 
 $totalItems = ''
 
 $CBnames = array()
 
 $clipObj
 
- Public Attributes inherited from TYPO3\CMS\Backend\RecordList\AbstractRecordList
 $iLimit = 10
 
 $leftMargin = 0
 
 $showIcon = 1
 
 $no_noWrap = 0
 
 $oddColumnsCssClass = ''
 
 $backPath = ''
 
 $fieldArray = array()
 
 $addElement_tdParams = array()
 
 $addElement_tdCssClass = array()
 
 $fixedL = 30
 
 $thisScript = ''
 
 $setLMargin = 1
 
 $counter = 0
 
 $totalItems = ''
 
 $firstElementNumber = 0
 
 $eCounter = 0
 
 $HTMLcode = ''
 
 $pageOverlays = array()
 
 $languageIconTitles = array()
 
 $translateTools
 

Protected Member Functions

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

Protected Attributes

 $folderObject
 
 $resourceFactory
 

Detailed Description

Class for rendering of File>Filelist

Author
Kasper Skårhøj kaspe.nosp@m.rYYY.nosp@m.Y@typ.nosp@m.o3.c.nosp@m.om

Definition at line 29 of file FileList.php.

Member Function Documentation

◆ dirData()

TYPO3\CMS\Filelist\FileList::dirData ( \TYPO3\CMS\Core\Resource\Folder  $folderObject)

Returns some data specific for the directories...

Parameters
\TYPO3\CMS\Core\Resource\Folder$folderObjectFile information array
Returns
array (title, icon, path)
Deprecated:
since 6.2 - will be removed two versions later without replacement

Definition at line 611 of file FileList.php.

References $GLOBALS, TYPO3\CMS\Core\Utility\GeneralUtility\logDeprecatedFunction(), TYPO3\CMS\Core\Resource\FolderInterface\ROLE_RECYCLER, and TYPO3\CMS\Core\Resource\FolderInterface\ROLE_TEMPORARY.

◆ formatDirList()

◆ formatFileList()

◆ generateList()

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

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

Returns
void
Todo:
Define visibility

Definition at line 208 of file FileList.php.

◆ getButtonsAndOtherMarkers()

TYPO3\CMS\Filelist\FileList::getButtonsAndOtherMarkers ( \TYPO3\CMS\Core\Resource\Folder  $folderObject)

◆ getDatabaseConnection()

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

Get database connection

Returns

Definition at line 989 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
Todo:
Define visibility

Definition at line 453 of file FileList.php.

◆ getLinkToParentFolder()

TYPO3\CMS\Filelist\FileList::getLinkToParentFolder ( \TYPO3\CMS\Core\Resource\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
\TYPO3\CMS\Core\Resource\Folder$currentFolder
Returns
string

Definition at line 430 of file FileList.php.

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 764 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 168 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
boolean
Todo:
Define visibility

Definition at line 782 of file FileList.php.

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

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

◆ linkClipboardHeaderIcon()

TYPO3\CMS\Filelist\FileList::linkClipboardHeaderIcon (   $string,
  $table,
  $cmd,
  $warning = '' 
)

Wrapping input string in a link with clipboard command.

Parameters
string$stringString to be linked - must be htmlspecialchar'ed / prepared before.
string$tabletable - NOT USED
string$cmd"cmd" value
string$warningWarning for JS confirm message
Returns
string Linked string
Todo:
Define visibility

Definition at line 280 of file FileList.php.

◆ linkWrapDir()

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

Wraps the directory-titles

Parameters
string$titleString to be wrapped in links
\TYPO3\CMS\Core\Resource\Folder$folderObjectFolder to work on
Returns
string HTML
Todo:
Define visibility

Definition at line 561 of file FileList.php.

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

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

◆ linkWrapFile()

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

Wraps filenames in links which opens them in a window IF they are in web-path.

Parameters
string$codeString to be wrapped in links
\TYPO3\CMS\Core\Resource\File$fileObjectFile to be linked
Returns
string HTML
Todo:
Define visibility

Definition at line 580 of file FileList.php.

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

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

◆ linkWrapSort()

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

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

Parameters
string$codeString to be wrapped
string$folderIdentifierID (path)
string$colSorting column
Returns
string HTML
Todo:
Define visibility

Definition at line 795 of file FileList.php.

References $GLOBALS, TYPO3\CMS\Backend\Utility\IconUtility\getSpriteIcon(), and TYPO3\CMS\Core\Utility\GeneralUtility\resolveBackPath().

◆ listURL()

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

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 (with the backpath), otherwise GeneralUtility::sanitizeLocalUrl() would say that the URL would be invalid

Returns
string URL
Todo:
Define visibility

Definition at line 597 of file FileList.php.

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

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

◆ makeClip()

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

Creates the clipboard control pad

Parameters
\TYPO3\CMS\Core\Resource\File | \TYPO3\CMS\Core\Resource\Folder$fileOrFolderObjectArray with information about the file/directory for which to make the clipboard panel for the listing.
Returns
string HTML-table
Todo:
Define visibility

Definition at line 815 of file FileList.php.

References $GLOBALS, TYPO3\CMS\Backend\Utility\IconUtility\getSpriteIcon(), and TYPO3\CMS\Core\Resource\Folder\getStorage().

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

◆ makeEdit()

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

Creates the edit control section

Parameters
\TYPO3\CMS\Core\Resource\File | \TYPO3\CMS\Core\Resource\Folder$fileOrFolderObjectArray with information about the file/directory for which to make the edit control section for the listing.
Returns
string HTML-table
Todo:
Define visibility

Definition at line 868 of file FileList.php.

References $GLOBALS, TYPO3\CMS\Backend\Utility\BackendUtility\editOnClick(), TYPO3\CMS\Backend\Utility\IconUtility\getSpriteIcon(), TYPO3\CMS\Backend\Utility\BackendUtility\getUrlToken(), TYPO3\CMS\Core\Utility\GeneralUtility\getUserObj(), TYPO3\CMS\Core\Utility\GeneralUtility\implodeArrayForUrl(), and TYPO3\CMS\Core\Utility\GeneralUtility\inList().

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

◆ makeRef()

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

Make reference count

Parameters
\TYPO3\CMS\Core\Resource\File | \TYPO3\CMS\Core\Resource\Folder$fileOrFolderObjectArray with information about the file/directory for which to make the clipboard panel for the listing.
Returns
string HTML
Todo:
Define visibility

Definition at line 965 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 ( \TYPO3\CMS\Core\Resource\Folder  $folderObject,
  $pointer,
  $sort,
  $sortRev,
  $clipBoard = FALSE,
  $bigControlPanel = FALSE 
)

Initialization of class

Parameters
\TYPO3\CMS\Core\Resource\Folder$folderObjectThe folder to work on
integer$pointerPointer
boolean$sortSorting column
boolean$sortRevSorting direction
boolean$bigControlPanelShow clipboard flag
Returns
void
Todo:
Define visibility

Definition at line 183 of file FileList.php.

References TYPO3\CMS\Filelist\FileList\$bigControlPanel, TYPO3\CMS\Filelist\FileList\$clipBoard, TYPO3\CMS\Filelist\FileList\$folderObject, $GLOBALS, TYPO3\CMS\Filelist\FileList\$sort, TYPO3\CMS\Filelist\FileList\$sortRev, TYPO3\CMS\Core\Resource\ResourceFactory\getInstance(), and TYPO3\CMS\Backend\Utility\BackendUtility\getModuleUrl().

Member Data Documentation

◆ $bigControlPanel

TYPO3\CMS\Filelist\FileList::$bigControlPanel = 0
Todo:
Define visibility

Definition at line 96 of file FileList.php.

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

◆ $CBnames

TYPO3\CMS\Filelist\FileList::$CBnames = array()
Todo:
Define visibility

Definition at line 153 of file FileList.php.

◆ $clickMenus

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

If TRUE click menus are generated on files and folders

Todo:
Define visibility

Definition at line 67 of file FileList.php.

◆ $clipBoard

TYPO3\CMS\Filelist\FileList::$clipBoard = 0
Todo:
Define visibility

Definition at line 91 of file FileList.php.

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

◆ $clipObj

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

Definition at line 158 of file FileList.php.

◆ $dirCounter

TYPO3\CMS\Filelist\FileList::$dirCounter = 0
Todo:
Define visibility

Definition at line 143 of file FileList.php.

◆ $dirs

TYPO3\CMS\Filelist\FileList::$dirs = array()
Todo:
Define visibility

Definition at line 116 of file FileList.php.

◆ $eCounter

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

Counting the elements no matter what

Todo:
Define visibility

Definition at line 138 of file FileList.php.

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

◆ $files

TYPO3\CMS\Filelist\FileList::$files = array()
Todo:
Define visibility

Definition at line 121 of file FileList.php.

◆ $firstElementNumber

TYPO3\CMS\Filelist\FileList::$firstElementNumber = 0
Todo:
Define visibility

Definition at line 86 of file FileList.php.

◆ $fixedL

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

Max length of strings

Todo:
Define visibility

Definition at line 55 of file FileList.php.

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

◆ $folderObject

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

◆ $HTMLcode

TYPO3\CMS\Filelist\FileList::$HTMLcode = ''
Todo:
Define visibility

Definition at line 106 of file FileList.php.

◆ $iLimit

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

Default Max items shown

Todo:
Define visibility

Definition at line 36 of file FileList.php.

◆ $JScode

TYPO3\CMS\Filelist\FileList::$JScode = ''
Todo:
Define visibility

Definition at line 101 of file FileList.php.

◆ $path

TYPO3\CMS\Filelist\FileList::$path = ''
Todo:
Define visibility

Definition at line 126 of file FileList.php.

◆ $resourceFactory

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

Definition at line 163 of file FileList.php.

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

◆ $script

TYPO3\CMS\Filelist\FileList::$script = ''
Todo:
Define visibility

Definition at line 60 of file FileList.php.

◆ $sort

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

The field to sort by

Todo:
Define visibility

Definition at line 74 of file FileList.php.

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

◆ $sortRev

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

Reverse sorting flag

Todo:
Define visibility

Definition at line 81 of file FileList.php.

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

◆ $thumbs

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

Boolean. Thumbnails on records containing files (pictures)

Todo:
Define visibility

Definition at line 43 of file FileList.php.

◆ $totalbytes

TYPO3\CMS\Filelist\FileList::$totalbytes = 0
Todo:
Define visibility

Definition at line 111 of file FileList.php.

◆ $totalItems

TYPO3\CMS\Filelist\FileList::$totalItems = ''
Todo:
Define visibility

Definition at line 148 of file FileList.php.

◆ $widthGif

TYPO3\CMS\Filelist\FileList::$widthGif = '<img src="clear.gif" width="1" height="1" hspace="165" alt="" />'
Todo:
Define visibility

Definition at line 48 of file FileList.php.