FileBrowser extends AbstractElementBrowser implements ElementBrowserInterface, LinkParameterProviderInterface
Browser for files
This class is a specific LinkBrowser implementation and is not part of the TYPO3's Core API.
Table of Contents
Interfaces
Properties
- $bparams : string
- Active with TYPO3 Element Browser: Contains the name of the form field for which this window opens - thus allows us to make references back to the main window in which the form is.
- $expandFolder : string|null
- 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.
- $iconFactory : IconFactory
- $moduleTemplate : ModuleTemplate
- $moduleTemplateFactory : ModuleTemplateFactory
- $pageRenderer : PageRenderer
- $request : ServerRequestInterface|null
- $searchWord : string
- $selectedFolder : FolderInterface
- $thisScript : string
- URL of current request
- $thumbnailConfiguration : array<string|int, mixed>
- $uriBuilder : UriBuilder
Methods
- __construct() : mixed
- getScriptUrl() : string
- Returns the URL of the current script
- getUrlParameters() : array<string|int, string>
- Provides an array or GET parameters for URL generation
- isCurrentlySelectedItem() : bool
- Check if given value is currently the selected item
- processSessionData() : array<int, array<string|int, mixed>|bool>
- Session data for this class can be set from outside with this method.
- render() : string
- renderFilesInFolder() : string
- For TYPO3 Element Browser: Expand folder of files.
- setRequest() : void
- determineScriptUrl() : mixed
- Sets the script url depending on being a module or script request
- fileIsSelectableInFileList() : bool
- Checks if the given file is selectable in the filelist.
- getBackendUser() : BackendUserAuthentication
- getBodyTagAttributes() : array<string, string>
- getBParamDataAttributes() : array<string, string>
- Splits parts of $this->bparams and returns needed data attributes for the Javascript
- getFilesInFolder() : array<string|int, File>
- Get a list of Files in a folder filtered by extension
- getLanguageService() : LanguageService
- getRequest() : ServerRequestInterface
- getThumbnailSelector() : string
- Get the HTML for the thumbnail selector, if enabled
- initialize() : mixed
- Loads additional JavaScript
- initVariables() : mixed
- Checks additional GET/POST requests
- setBodyTagParameters() : mixed
- Initialize the body tag for the module
Properties
$bparams
Active with TYPO3 Element Browser: Contains the name of the form field for which this window opens - thus allows us to make references back to the main window in which the form is.
protected
string
$bparams
= ''
Example value: "data[pages][39][bodytext]|||tt_content|"
or "data[tt_content][NEW3fba56fde763d][image]|||gif,jpg,jpeg,tif,bmp,pcx,tga,png,pdf,ai|"
Values:
0: form field name reference, eg. "data[tt_content][123][image]"
1: htmlArea RTE parameters: editorNo:contentTypo3Language
2: RTE config parameters: RTEtsConfigParams
3: allowed types. Eg. "tt_content" or "gif,jpg,jpeg,tif,bmp,pcx,tga,png,pdf,ai"
4: IRRE uniqueness: target level object-id to perform actions/checks on, eg. "data-4-pages-4-nav_icon-sys_file_reference" ("data- $pArr = explode('|', $this->bparams);
$formFieldName = $pArr[0];
$allowedTablesOrFileTypes = $pArr[3]; 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/" URL of current request Returns the URL of the current script Provides an array or GET parameters for URL generation Array of values to include into the parameters Array of parameters which have to be added to URLs Check if given value is currently the selected item Values to be checked Returns TRUE if the given values match the currently selected item Session data for this class can be set from outside with this method. Session data array Session data and boolean which indicates that data needs to be stored in session because it's changed HTML content For TYPO3 Element Browser: Expand folder of files. The folder path to expand List of fileextensions to show Whether to show thumbnails or not. If set, no thumbnails are shown. HTML output Sets the script url depending on being a module or script request Checks if the given file is selectable in the filelist. By default all files are selectable. This method may be overwritten in child classes. Image dimensions from \TYPO3\CMS\Core\Imaging\GraphicalFunctions::getImageDimensions() TRUE if file is selectable. Array of body-tag attributes Splits parts of $this->bparams and returns needed data attributes for the Javascript Data attributes for Javascript Get a list of Files in a folder filtered by extension Get the HTML for the thumbnail selector, if enabled HTML data required for the thumbnail selector Loads additional JavaScript Checks additional GET/POST requests Initialize the body tag for the module-
$expandFolder
protected
string|null
$expandFolder
$iconFactory
protected
IconFactory
$iconFactory
$moduleTemplate
protected
ModuleTemplate
$moduleTemplate
$moduleTemplateFactory
protected
ModuleTemplateFactory
$moduleTemplateFactory
$pageRenderer
protected
PageRenderer
$pageRenderer
$request
protected
ServerRequestInterface|null
$request
= null
$searchWord
protected
string
$searchWord
$selectedFolder
protected
FolderInterface
$selectedFolder
$thisScript
protected
string
$thisScript
= ''
$thumbnailConfiguration
protected
array<string|int, mixed>
$thumbnailConfiguration
= []
$uriBuilder
protected
UriBuilder
$uriBuilder
Methods
__construct()
public
__construct(IconFactory $iconFactory, PageRenderer $pageRenderer, UriBuilder $uriBuilder, ModuleTemplateFactory $moduleTemplateFactory) : mixed
Parameters
getScriptUrl()
public
getScriptUrl() : string
Return values
string
getUrlParameters()
public
getUrlParameters(array<string|int, mixed> $values) : array<string|int, string>
Parameters
Return values
array<string|int, string>
—
isCurrentlySelectedItem()
public
isCurrentlySelectedItem(array<string|int, mixed> $values) : bool
Parameters
Return values
bool
—
processSessionData()
public
processSessionData(array<string|int, mixed> $data) : array<int, array<string|int, mixed>|bool>
Parameters
Return values
array<int, array<string|int, mixed>|bool>
—
render()
public
render() : string
Return values
string
—
renderFilesInFolder()
public
renderFilesInFolder(FolderInterface $folder[, array<string|int, mixed> $extensionList = [] ][, bool $noThumbs = false ]) : string
Parameters
Return values
string
—
setRequest()
public
setRequest(ServerRequestInterface $request) : void
Parameters
determineScriptUrl()
protected
determineScriptUrl() : mixed
fileIsSelectableInFileList()
protected
fileIsSelectableInFileList(FileInterface $file, array<string|int, mixed> $imgInfo) : bool
Parameters
Return values
bool
—
getBackendUser()
protected
getBackendUser() : BackendUserAuthentication
Return values
BackendUserAuthentication
getBodyTagAttributes()
protected
getBodyTagAttributes() : array<string, string>
Return values
array<string, string>
—
getBParamDataAttributes()
protected
getBParamDataAttributes() : array<string, string>
Return values
array<string, string>
—
getFilesInFolder()
protected
getFilesInFolder(FolderInterface $folder, array<string|int, mixed> $extensionList) : array<string|int, File>
Parameters
Return values
array<string|int, File>
getLanguageService()
protected
getLanguageService() : LanguageService
Return values
LanguageService
getRequest()
protected
getRequest() : ServerRequestInterface
Return values
ServerRequestInterface
getThumbnailSelector()
protected
getThumbnailSelector() : string
Return values
string
—
initialize()
protected
initialize() : mixed
initVariables()
protected
initVariables() : mixed
setBodyTagParameters()
protected
setBodyTagParameters() : mixed
Search results