TYPO3CMS  8
 All Classes Namespaces Files Functions Variables Pages
FileBrowser Class Reference
Inheritance diagram for FileBrowser:
AbstractElementBrowser ElementBrowserInterface LinkParameterProviderInterface

Public Member Functions

 processSessionData ($data)
 
 renderFilesInFolder (Folder $folder, array $extensionList=[], $noThumbs=false)
 
 getUrlParameters (array $values)
 
 isCurrentlySelectedItem (array $values)
 
 getScriptUrl ()
 
- Public Member Functions inherited from AbstractElementBrowser
 __construct ()
 
- Public Member Functions inherited from ElementBrowserInterface
 render ()
 

Protected Member Functions

 initialize ()
 
 initVariables ()
 
 getBulkSelector ($filesCount)
 
 fileIsSelectableInFileList (FileInterface $file, array $imgInfo)
 
 getBodyTagAttributes ()
 
- Protected Member Functions inherited from AbstractElementBrowser
 initialize ()
 
 determineScriptUrl ()
 
 initVariables ()
 
 initDocumentTemplate ()
 
 getBodyTagAttributes ()
 
 getBParamDataAttributes ()
 
 getLanguageService ()
 
 getBackendUser ()
 

Protected Attributes

 $expandFolder
 
 $selectedFolder
 
 $elements = []
 
 $searchWord
 
 $fileRepository
 
- Protected Attributes inherited from AbstractElementBrowser
 $doc
 
 $pageRenderer = null
 
 $thisScript = ''
 
 $iconFactory
 
 $bparams
 

Detailed Description

Browser for files

Definition at line 35 of file FileBrowser.php.

Member Function Documentation

fileIsSelectableInFileList ( FileInterface  $file,
array  $imgInfo 
)
protected

Checks if the given file is selectable in the filelist.

By default all files are selectable. This method may be overwritten in child classes.

Parameters
FileInterface$file
mixed[]$imgInfo Image dimensions from ::getImageDimensions()
Returns
bool TRUE if file is selectable.

Definition at line 434 of file FileBrowser.php.

Referenced by FileBrowser\renderFilesInFolder().

getBodyTagAttributes ( )
protected
Returns
string[] Array of body-tag attributes

Definition at line 442 of file FileBrowser.php.

getBulkSelector (   $filesCount)
protected

Get the HTML data required for a bulk selection of files of the TYPO3 Element Browser.

Parameters
int$filesCountNumber of files currently displayed
Returns
string HTML data required for a bulk selection of files - if $filesCount is 0, nothing is returned

Definition at line 391 of file FileBrowser.php.

References GeneralUtility\_GP(), AbstractElementBrowser\getBackendUser(), BackendUtility\getFuncCheck(), AbstractElementBrowser\getLanguageService(), BackendUtility\getModuleData(), FileBrowser\getUrlParameters(), and GeneralUtility\implodeArrayForUrl().

Referenced by FileBrowser\renderFilesInFolder().

getScriptUrl ( )

Returns the URL of the current script

Returns
string

Implements LinkParameterProviderInterface.

Definition at line 477 of file FileBrowser.php.

References AbstractElementBrowser\$thisScript.

getUrlParameters ( array  $values)
Parameters
array$valuesArray of values to include into the parameters
Returns
string[] Array of parameters which have to be added to URLs

Implements LinkParameterProviderInterface.

Definition at line 454 of file FileBrowser.php.

References AbstractElementBrowser\$bparams, and FileBrowser\$expandFolder.

Referenced by FileBrowser\getBulkSelector().

initialize ( )
protected
Returns
void

Definition at line 72 of file FileBrowser.php.

References GeneralUtility\makeInstance().

initVariables ( )
protected
Returns
void

Definition at line 82 of file FileBrowser.php.

References GeneralUtility\_GP().

isCurrentlySelectedItem ( array  $values)
Parameters
array$valuesValues to be checked
Returns
bool Returns TRUE if the given values match the currently selected item

Implements LinkParameterProviderInterface.

Definition at line 467 of file FileBrowser.php.

processSessionData (   $data)

Session data for this class can be set from outside with this method.

Parameters
mixed[]$data Session data array
Returns
array[] Session data and boolean which indicates that data needs to be stored in session because it's changed

Implements ElementBrowserInterface.

Definition at line 95 of file FileBrowser.php.

References FileBrowser\$expandFolder.

renderFilesInFolder ( Folder  $folder,
array  $extensionList = [],
  $noThumbs = false 
)

For TYPO3 Element Browser: Expand folder of files.

Parameters
Folder$folderThe folder path to expand
array$extensionListList of fileextensions to show
bool$noThumbsWhether to show thumbnails or not. If set, no thumbnails are shown.
Returns
string HTML output

Definition at line 231 of file FileBrowser.php.

References $GLOBALS, Folder\checkActionPermission(), ProcessedFile\CONTEXT_IMAGEPREVIEW, FileBrowser\fileIsSelectableInFileList(), GeneralUtility\formatSize(), AbstractElementBrowser\getBackendUser(), FileBrowser\getBulkSelector(), Folder\getIdentifier(), GeneralUtility\getIndpEnv(), AbstractElementBrowser\getLanguageService(), GeneralUtility\inList(), GeneralUtility\makeInstance(), and Icon\SIZE_SMALL.

Member Data Documentation

$elements = []
protected

Definition at line 57 of file FileBrowser.php.

$expandFolder
protected

Definition at line 45 of file FileBrowser.php.

Referenced by FileBrowser\getUrlParameters(), and FileBrowser\processSessionData().

$fileRepository
protected

Definition at line 67 of file FileBrowser.php.

$searchWord
protected

Definition at line 62 of file FileBrowser.php.

$selectedFolder
protected

Definition at line 50 of file FileBrowser.php.