TYPO3  7.6
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
FileList Class Reference
Inheritance diagram for FileList:
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= '')
 
 formatFileList (array $files)
 
 isImage ($ext)
 
 isMediaFile ($ext)
 
 linkWrapSort ($code, $folderIdentifier, $col)
 
 makeClip ($fileOrFolderObject)
 
 makeEdit ($fileOrFolderObject)
 
 makeRef ($fileOrFolderObject)
 
- Public Member Functions inherited from AbstractRecordList
 __construct ()
 
 addElement ($h, $icon, $data, $rowParams= '', $_= '', $_2= '', $colType= 'td')
 
 writeTop ()
 
 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 = false
 
 $spaceIcon
 
 $fixedL = 30
 
 $clickMenus = 1
 
 $sort = ''
 
 $sortRev = 1
 
 $firstElementNumber = 0
 
 $clipBoard = 0
 
 $bigControlPanel = 0
 
 $JScode = ''
 
 $HTMLcode = ''
 
 $totalbytes = 0
 
 $dirs = array()
 
 $files = array()
 
 $path = ''
 
 $eCounter = 0
 
 $totalItems = ''
 
 $CBnames = array()
 
 $clipObj
 
- Public Attributes inherited from AbstractRecordList
 $iLimit = 10
 
 $leftMargin = 0
 
 $showIcon = 1
 
 $no_noWrap = 0
 
 $oddColumnsCssClass = ''
 
 $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 (Folder $currentFolder)
 
 getTranslationsForMetaData ($metaDataRecord)
 
 getDatabaseConnection ()
 
 getLanguageService ()
 
 getBackendUser ()
 
- Protected Member Functions inherited from AbstractRecordList
 determineScriptUrl ()
 
 getThisScript ()
 
 getTranslateTools ()
 
 generateReferenceToolTip ($references, $launchViewParameter= '')
 
 getLanguageService ()
 
 getDatabaseConnection ()
 

Protected Attributes

 $folderObject
 
 $resourceFactory
 
 $iconFactory
 
 $fileListController
 
- Protected Attributes inherited from AbstractRecordList
 $id = 0
 
 $iconFactory
 

Detailed Description

Class for rendering of File>Filelist

Definition at line 40 of file FileList.php.

Constructor & Destructor Documentation

__construct ( FileListController  $fileListController)

Construct

Parameters
FileListController$fileListController

Definition at line 191 of file FileList.php.

References FileList\$fileListController, and GeneralUtility\makeInstance().

Member Function Documentation

formatDirList ( array  $folders)

This returns tablerows for the directories in the array $items['sorting'].

Parameters
Folder[]$folders Folders of
Returns
string HTML table rows.

Definition at line 515 of file FileList.php.

formatFileList ( array  $files)

This returns tablerows for the files in the array $items['sorting'].

Parameters
File[]$files File items
Returns
string HTML table rows.

Definition at line 664 of file FileList.php.

References $url, and elseif.

generateList ( )

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

Returns
void

Definition at line 233 of file FileList.php.

getBackendUser ( )
protected

Returns the current BE user.

Returns

Definition at line 1072 of file FileList.php.

References $GLOBALS.

Referenced by FileList\start().

getButtonsAndOtherMarkers ( Folder  $folderObject)

Return the buttons used by the filelist to include in the top header

Parameters
Folder$folderObject
Returns
array
Deprecated:
since TYPO3 CMS 7, will be removed in TYPO3 CMS 8, buttons are now defined in FileListController

Definition at line 245 of file FileList.php.

References Folder\checkActionPermission(), GeneralUtility\fixed_lgd_cs(), Folder\getCombinedIdentifier(), FileList\getLanguageService(), FileList\getLinkToParentFolder(), Folder\getReadablePath(), Folder\getStorage(), FileList\listURL(), GeneralUtility\logDeprecatedFunction(), Icon\SIZE_SMALL, and BackendUtility\wrapClickMenuOnIcon().

getDatabaseConnection ( )
protected

Returns the database connection

Returns
DatabaseConnection

Definition at line 1052 of file FileList.php.

References $GLOBALS.

getFolderInfo ( )

Gets the number of files and total size of a folder

Returns
string

Definition at line 499 of file FileList.php.

getLanguageService ( )
protected

Returns an instance of LanguageService

Returns

Definition at line 1062 of file FileList.php.

References $GLOBALS.

Referenced by FileList\getButtonsAndOtherMarkers(), and FileList\start().

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 475 of file FileList.php.

Referenced by FileList\getButtonsAndOtherMarkers().

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 799 of file FileList.php.

References $GLOBALS.

injectResourceFactory ( ResourceFactory  $resourceFactory)
Parameters
ResourceFactory$resourceFactory

Definition at line 171 of file FileList.php.

References FileList\$resourceFactory.

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 817 of file FileList.php.

References $GLOBALS.

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 828 of file FileList.php.

References $GLOBALS.

linkClipboardHeaderIcon (   $string,
  $_,
  $cmd,
  $warning = '' 
)

Wrapping input string in a link with clipboard command.

Parameters
string$stringString to be linked - must be htmlspecialchar'ed / prepared before.
string$_unused
string$cmd"cmd" value
string$warningWarning for JS confirm message
Returns
string Linked string

Definition at line 308 of file FileList.php.

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 599 of file FileList.php.

References Folder\getCombinedIdentifier().

linkWrapFile (   $code,
File  $fileObject 
)

Wraps filenames in links which opens the metadata editor.

Parameters
string$codeString to be wrapped in links
File$fileObjectFile to be linked
Returns
string HTML

Definition at line 618 of file FileList.php.

References $url, File\_getMetaData(), File\checkActionPermission(), and File\isIndexed().

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 841 of file FileList.php.

listURL (   $altId = '')

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
Returns
string URL

Definition at line 650 of file FileList.php.

Referenced by FileList\getButtonsAndOtherMarkers().

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 863 of file FileList.php.

References Folder\checkActionPermission(), elseif, and Folder\getStorage().

makeEdit (   $fileOrFolderObject)

Creates the edit control section

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

Definition at line 926 of file FileList.php.

References $GLOBALS, $url, File\checkActionPermission(), and elseif.

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 1027 of file FileList.php.

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 209 of file FileList.php.

References FileList\$bigControlPanel, FileList\$clipBoard, FileList\$folderObject, FileList\$sort, FileList\$sortRev, FileList\getBackendUser(), ResourceFactory\getInstance(), FileList\getLanguageService(), Folder\getReadablePath(), and path.

Member Data Documentation

$bigControlPanel = 0

Definition at line 104 of file FileList.php.

Referenced by FileList\start().

$CBnames = array()

Definition at line 156 of file FileList.php.

$clickMenus = 1

Definition at line 75 of file FileList.php.

$clipBoard = 0

Definition at line 99 of file FileList.php.

Referenced by FileList\start().

Clipboard $clipObj

Definition at line 161 of file FileList.php.

$dirs = array()

Definition at line 124 of file FileList.php.

$eCounter = 0

Definition at line 146 of file FileList.php.

$fileListController
protected

Definition at line 184 of file FileList.php.

Referenced by FileList\__construct().

$files = array()

Definition at line 129 of file FileList.php.

$firstElementNumber = 0

Definition at line 94 of file FileList.php.

$fixedL = 30

Definition at line 68 of file FileList.php.

$folderObject
protected

Definition at line 139 of file FileList.php.

Referenced by FileList\start().

$HTMLcode = ''

Definition at line 114 of file FileList.php.

$iconFactory
protected

Definition at line 179 of file FileList.php.

$iLimit = 40

Definition at line 47 of file FileList.php.

$JScode = ''

Definition at line 109 of file FileList.php.

$path = ''

Definition at line 134 of file FileList.php.

$resourceFactory
protected

Definition at line 166 of file FileList.php.

Referenced by FileList\injectResourceFactory().

$sort = ''

Definition at line 82 of file FileList.php.

Referenced by FileList\start().

$sortRev = 1

Definition at line 89 of file FileList.php.

Referenced by FileList\start().

$spaceIcon

Definition at line 61 of file FileList.php.

$thumbs = false

Definition at line 54 of file FileList.php.

$totalbytes = 0

Definition at line 119 of file FileList.php.

$totalItems = ''

Definition at line 151 of file FileList.php.