FolderBrowser

class \TYPO3\CMS\Filelist\ElementBrowser\FolderBrowser

Extends
AbstractResourceBrowser

Browser for folders. This is used with type=folder to select folders.

Table of Contents

Constants

IDENTIFIER  : mixed = 'folder'

Properties

$backendViewFactory  : BackendViewFactory
$browserParameters  : ElementBrowserParameters
Typed DTO containing all browser parameters.
$componentFactory  : ComponentFactory
$currentPage  : int
$displayThumbs  : bool
$expandFolder  : string|null
$extensionConfiguration  : ExtensionConfiguration
$filelist  : FileList|null
$iconFactory  : IconFactory
$identifier  : string
$moduleStorageIdentifier  : string
$pageRenderer  : PageRenderer
$request  : ServerRequestInterface|null
$resourceDisplayMatcher  : Matcher|null
$resourceSelectableMatcher  : Matcher|null
$selectedFolder  : Folder|null
$sortDirection  : SortDirection|null
$sortField  : string
$tcaSchemaFactory  : TcaSchemaFactory
$uriBuilder  : UriBuilder
$view  : ViewInterface
$viewMode  : ViewMode|null

Methods

__construct()  : mixed
getIdentifier()  : string
Returns the identifier for the browser
getUrlParameters()  : string[]
Provides an array or GET parameters for URL generation
processSessionData()  : array<int, array|bool>
Session data for this class can be set from outside with this method.
render()  : string
setRequest()  : void
createUri()  : string
getBackendFavicon()  : string
Retrieves configured favicon for backend with fallback.
getBackendUser()  : BackendUserAuthentication
getBodyTagAttributes()  : array<string, string>
getBodyTagParameters()  : string
getBParamDataAttributes()  : array<string, string|null>
Returns data attributes for the body tag, used by the Javascript.
getLanguageService()  : LanguageService
getRequest()  : ServerRequestInterface
getSortingModeButtons()  : ButtonInterface
getUriForFileName()  : string
Returns the uri for a system resource
getViewModeButton()  : ButtonInterface
initialize()  : void
Loads additional JavaScript
initializeDragUploader()  : void
initSelectedFolder()  : void
Last selected folder is stored in user module session. Sanitize it to set $this->selectedFolder or keep it null.
initVariables()  : void
loadStylesheets()  : void
Load all registered stylesheets from $GLOBALS['TYPO3_CONF_VARS']['BE']['stylesheets']
setUpBasicPageRendererForBackend()  : void
Sets mandatory parameters for the PageRenderer.

Constants

IDENTIFIER

public mixed IDENTIFIER = 'folder'

Properties

$currentPage

protected int $currentPage = 1

$displayThumbs

protected bool $displayThumbs = true

$expandFolder

protected string|null $expandFolder = null

$identifier

protected string $identifier = self::IDENTIFIER

$moduleStorageIdentifier

protected string $moduleStorageIdentifier = 'media_management'

$request

protected ServerRequestInterface|null $request = null

$resourceSelectableMatcher

protected Matcher|null $resourceSelectableMatcher = null

$sortField

protected string $sortField = 'name'

Methods

__construct()

public __construct(IconFactory $iconFactory, PageRenderer $pageRenderer, UriBuilder $uriBuilder, ExtensionConfiguration $extensionConfiguration, BackendViewFactory $backendViewFactory, TcaSchemaFactory $tcaSchemaFactory, ComponentFactory $componentFactory) : mixed

Parameters

$iconFactory : IconFactory
$pageRenderer : PageRenderer
$uriBuilder : UriBuilder
$extensionConfiguration : ExtensionConfiguration
$backendViewFactory : BackendViewFactory
$tcaSchemaFactory : TcaSchemaFactory
$componentFactory : ComponentFactory

getIdentifier()

Returns the identifier for the browser

public getIdentifier() : string

Return values

string

getUrlParameters()

Provides an array or GET parameters for URL generation

public getUrlParameters(array $values) : string[]

Parameters

$values : array

Array of values to include into the parameters

Return values

string[] —

Array of parameters which have to be added to URLs

processSessionData()

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

public processSessionData(array $data) : array<int, array|bool>

Parameters

$data : array

Session data array

Return values

array<int, array|bool> —

Session data and boolean which indicates that data needs to be stored in session because it's changed

render()

public render() : string

Return values

string —

HTML content

setRequest()

public setRequest(ServerRequestInterface $request) : void

Parameters

$request : ServerRequestInterface

createUri()

protected createUri([array $parameters = [] ]) : string

Parameters

$parameters : array = []

Return values

string

getBackendFavicon()

Retrieves configured favicon for backend with fallback.

protected getBackendFavicon(ExtensionConfiguration $extensionConfiguration, ServerRequestInterface $request) : string

Parameters

$extensionConfiguration : ExtensionConfiguration
$request : ServerRequestInterface

Return values

string

getBodyTagAttributes()

protected getBodyTagAttributes() : array<string, string>

Return values

array<string, string> —

Array of body-tag attributes

getBodyTagParameters()

protected getBodyTagParameters() : string

Return values

string

getBParamDataAttributes()

Returns data attributes for the body tag, used by the Javascript.

protected getBParamDataAttributes() : array<string, string|null>

Return values

array<string, string|null> —

Data attributes for Javascript

getRequest()

protected getRequest() : ServerRequestInterface

Return values

ServerRequestInterface

initialize()

Loads additional JavaScript

protected initialize(ServerRequestInterface $request) : void

Parameters

$request : ServerRequestInterface

initializeDragUploader()

protected initializeDragUploader() : void

initSelectedFolder()

Last selected folder is stored in user module session. Sanitize it to set $this->selectedFolder or keep it null.

protected initSelectedFolder() : void

initVariables()

protected initVariables(ServerRequestInterface $request) : void

Parameters

$request : ServerRequestInterface

loadStylesheets()

Load all registered stylesheets from $GLOBALS['TYPO3_CONF_VARS']['BE']['stylesheets']

protected loadStylesheets(PageRenderer $pageRenderer) : void

Parameters

$pageRenderer : PageRenderer
On this page