‪TYPO3CMS  10.4
TYPO3\CMS\Recordlist\Browser\FileBrowser Class Reference
Inheritance diagram for TYPO3\CMS\Recordlist\Browser\FileBrowser:
TYPO3\CMS\Recordlist\Browser\AbstractElementBrowser TYPO3\CMS\Recordlist\Browser\ElementBrowserInterface TYPO3\CMS\Recordlist\Tree\View\LinkParameterProviderInterface

Public Member Functions

array[] processSessionData ($data)
 
string render ()
 
string renderFilesInFolder (Folder $folder, array $extensionList=[], $noThumbs=false)
 
string[] getUrlParameters (array $values)
 
bool isCurrentlySelectedItem (array $values)
 
string getScriptUrl ()
 
- ‪Public Member Functions inherited from ‪TYPO3\CMS\Recordlist\Browser\AbstractElementBrowser
 __construct ()
 

Protected Member Functions

 initialize ()
 
 initVariables ()
 
File[] getFilesInFolder (Folder $folder, array $extensionList)
 
string getBulkSelector ($filesCount)
 
bool fileIsSelectableInFileList (FileInterface $file, array $imgInfo)
 
string[] getBodyTagAttributes ()
 
- ‪Protected Member Functions inherited from ‪TYPO3\CMS\Recordlist\Browser\AbstractElementBrowser
 determineScriptUrl ()
 
 setBodyTagParameters ()
 
array< string, getBodyTagAttributes();protected array< string, function getBParamDataAttributes() {[ $fieldRef, $rteParams, $rteConfig,, $irreObjectId]=explode('|', $this->bparams);return['data-this-script-url'=> strpos( $this->thisScript, '?')===false ? $this-> LanguageService function getLanguageService ()
 
BackendUserAuthentication getBackendUser ()
 

Protected Attributes

string null $expandFolder
 
Folder $selectedFolder
 
mixed[][] $elements = array( )
 
string $searchWord
 
FileRepository $fileRepository
 
array $thumbnailConfiguration = array( )
 
- ‪Protected Attributes inherited from ‪TYPO3\CMS\Recordlist\Browser\AbstractElementBrowser
ModuleTemplate $moduleTemplate
 
PageRenderer $pageRenderer
 
string $thisScript = ''
 
IconFactory $iconFactory
 
string $bparams
 
array< string, function getBodyTagAttributes();protected array< string, function getBParamDataAttributes() {[ $fieldRef, $rteParams, $rteConfig,, $irreObjectId]=explode('|', $this->bparams);return['data-this-script-url'=> strpos( $this->thisScript, '?')===false ? $this-> thisScript: $this->thisScript . '&'
 

Detailed Description

Browser for files

This class is a specific LinkBrowser implementation and is not part of the TYPO3's Core API.

Definition at line 41 of file FileBrowser.php.

Member Function Documentation

◆ fileIsSelectableInFileList()

bool TYPO3\CMS\Recordlist\Browser\FileBrowser::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 \TYPO3\CMS\Core\Imaging\GraphicalFunctions::getImageDimensions()
Returns
‪bool TRUE if file is selectable.

Definition at line 424 of file FileBrowser.php.

Referenced by TYPO3\CMS\Recordlist\Browser\FileBrowser\renderFilesInFolder().

◆ getBodyTagAttributes()

string [] TYPO3\CMS\Recordlist\Browser\FileBrowser::getBodyTagAttributes ( )
protected
Returns
‪string[] Array of body-tag attributes

Definition at line 432 of file FileBrowser.php.

◆ getBulkSelector()

string TYPO3\CMS\Recordlist\Browser\FileBrowser::getBulkSelector (   $filesCount)
protected

◆ getFilesInFolder()

File [] TYPO3\CMS\Recordlist\Browser\FileBrowser::getFilesInFolder ( Folder  $folder,
array  $extensionList 
)
protected

Get a list of Files in a folder filtered by extension

Parameters
Folder$folder
array$extensionList
Returns
‪File[]

Definition at line 363 of file FileBrowser.php.

References TYPO3\CMS\Core\Resource\Folder\getFiles(), and TYPO3\CMS\Core\Resource\Folder\setFileAndFolderNameFilters().

Referenced by TYPO3\CMS\Recordlist\Browser\FileBrowser\renderFilesInFolder().

◆ getScriptUrl()

string TYPO3\CMS\Recordlist\Browser\FileBrowser::getScriptUrl ( )

Returns the URL of the current script

Returns
‪string

Implements TYPO3\CMS\Recordlist\Tree\View\LinkParameterProviderInterface.

Definition at line 467 of file FileBrowser.php.

References TYPO3\CMS\Recordlist\Browser\AbstractElementBrowser\$thisScript.

◆ getUrlParameters()

string [] TYPO3\CMS\Recordlist\Browser\FileBrowser::getUrlParameters ( array  $values)
Parameters
array$values‪Array of values to include into the parameters
Returns
‪string[] Array of parameters which have to be added to URLs

Implements TYPO3\CMS\Recordlist\Tree\View\LinkParameterProviderInterface.

Definition at line 444 of file FileBrowser.php.

References TYPO3\CMS\Recordlist\Browser\AbstractElementBrowser\$bparams, and TYPO3\CMS\Recordlist\Browser\FileBrowser\$expandFolder.

Referenced by TYPO3\CMS\Recordlist\Browser\FileBrowser\getBulkSelector().

◆ initialize()

◆ initVariables()

TYPO3\CMS\Recordlist\Browser\FileBrowser::initVariables ( )
protected

Checks additional GET/POST requests

Reimplemented from TYPO3\CMS\Recordlist\Browser\AbstractElementBrowser.

Definition at line 95 of file FileBrowser.php.

◆ isCurrentlySelectedItem()

bool TYPO3\CMS\Recordlist\Browser\FileBrowser::isCurrentlySelectedItem ( array  $values)
Parameters
array$values‪Values to be checked
Returns
‪bool Returns TRUE if the given values match the currently selected item

Implements TYPO3\CMS\Recordlist\Tree\View\LinkParameterProviderInterface.

Definition at line 457 of file FileBrowser.php.

◆ processSessionData()

array [] TYPO3\CMS\Recordlist\Browser\FileBrowser::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 TYPO3\CMS\Recordlist\Browser\ElementBrowserInterface.

Definition at line 108 of file FileBrowser.php.

References TYPO3\CMS\Recordlist\Browser\FileBrowser\$expandFolder.

◆ render()

◆ renderFilesInFolder()

Member Data Documentation

◆ $elements

mixed [][] TYPO3\CMS\Recordlist\Browser\FileBrowser::$elements = array( )
protected

Holds information about files

Definition at line 60 of file FileBrowser.php.

◆ $expandFolder

string null TYPO3\CMS\Recordlist\Browser\FileBrowser::$expandFolder
protected

When you click a folder name/expand icon to see the content of a certain file folder, this value will contain the path of the expanded file folder. If the value is NOT set, then it will be restored from the module session data. Example value: "/www/htdocs/typo3/32/3dsplm/fileadmin/css/"

Definition at line 50 of file FileBrowser.php.

Referenced by TYPO3\CMS\Recordlist\Browser\FileBrowser\getUrlParameters(), and TYPO3\CMS\Recordlist\Browser\FileBrowser\processSessionData().

◆ $fileRepository

FileRepository TYPO3\CMS\Recordlist\Browser\FileBrowser::$fileRepository
protected

Definition at line 68 of file FileBrowser.php.

◆ $searchWord

string TYPO3\CMS\Recordlist\Browser\FileBrowser::$searchWord
protected

Definition at line 64 of file FileBrowser.php.

◆ $selectedFolder

Folder TYPO3\CMS\Recordlist\Browser\FileBrowser::$selectedFolder
protected

Definition at line 54 of file FileBrowser.php.

◆ $thumbnailConfiguration

array TYPO3\CMS\Recordlist\Browser\FileBrowser::$thumbnailConfiguration = array( )
protected

Definition at line 72 of file FileBrowser.php.