ElementBrowserParameters implements JsonSerializable

Read onlyYes
FinalYes

Data Transfer Object for Element Browser parameters.

Provides type-safe access to the parameters passed between FormEngine and the Element Browser.

Internal

This class is not part of the TYPO3 Core API.

Table of Contents

Interfaces

JsonSerializable

Properties

$allowedTypes  : string
$disallowedFileExtensions  : string
$fieldReference  : string
$irreObjectId  : string
$useEvents  : bool

Methods

__construct()  : mixed
fromRequest()  : self
Creates an instance from the current HTTP request.
getAllowedFileExtensions()  : array<string|int, string>
Returns the allowed file extensions as an array.
getAllowedTables()  : array<string|int, string>
Parses the allowed tables from the allowedTypes field.
getDisallowedFileExtensions()  : array<string|int, string>
Returns the disallowed file extensions as an array.
getFieldReferenceParts()  : array{tableName: string, fieldName: string}
Returns the field reference parsed into table name and field name.
getFileExtensions()  : array{allowed: string[], disallowed: string[]}
Parses the allowed file extensions from the allowedTypes field.
jsonSerialize()  : array<string|int, mixed>
toArray()  : array{fieldReference: string, allowedTypes: string, disallowedFileExtensions: string, irreObjectId: string, useEvents: bool}
Returns array representation of the parameters.
toDataAttributes()  : array<string, string|null>
Returns data attributes for use in HTML elements (body tag).
toQueryParameters()  : array<string, string>
Returns URL query parameters array (new format).

Properties

$allowedTypes

public string $allowedTypes = ''

$disallowedFileExtensions

public string $disallowedFileExtensions = ''

$fieldReference

public string $fieldReference = ''

$irreObjectId

public string $irreObjectId = ''

Methods

__construct()

public __construct([string $fieldReference = '' ][, string $allowedTypes = '' ][, string $disallowedFileExtensions = '' ][, string $irreObjectId = '' ][, bool $useEvents = false ]) : mixed
Parameters
$fieldReference : string = ''

Form field name reference, e.g., "data[tt_content][123][image]"

$allowedTypes : string = ''

Allowed types: tables (comma-separated) for db mode, or file extensions for file mode

$disallowedFileExtensions : string = ''

Disallowed file extensions (comma-separated) for file mode

$irreObjectId : string = ''

IRRE uniqueness target, e.g., "data-4-pages-4-nav_icon-sys_file_reference"

$useEvents : bool = false

fromRequest()

Creates an instance from the current HTTP request.

public static fromRequest(ServerRequestInterface $request) : self
Parameters
$request : ServerRequestInterface
Return values
self

getAllowedFileExtensions()

Returns the allowed file extensions as an array.

public getAllowedFileExtensions() : array<string|int, string>
Return values
array<string|int, string>

List of allowed file extensions

getAllowedTables()

Parses the allowed tables from the allowedTypes field.

public getAllowedTables() : array<string|int, string>
Return values
array<string|int, string>

List of allowed table names

getDisallowedFileExtensions()

Returns the disallowed file extensions as an array.

public getDisallowedFileExtensions() : array<string|int, string>
Return values
array<string|int, string>

List of disallowed file extensions

getFieldReferenceParts()

Returns the field reference parsed into table name and field name.

public getFieldReferenceParts() : array{tableName: string, fieldName: string}

Parses format like "data[tt_content][123][image]" to extract table name ("tt_content") and field name ("image").

Return values
array{tableName: string, fieldName: string}

getFileExtensions()

Parses the allowed file extensions from the allowedTypes field.

public getFileExtensions() : array{allowed: string[], disallowed: string[]}
Return values
array{allowed: string[], disallowed: string[]}

jsonSerialize()

public jsonSerialize() : array<string|int, mixed>
Return values
array<string|int, mixed>

toArray()

Returns array representation of the parameters.

public toArray() : array{fieldReference: string, allowedTypes: string, disallowedFileExtensions: string, irreObjectId: string, useEvents: bool}
Return values
array{fieldReference: string, allowedTypes: string, disallowedFileExtensions: string, irreObjectId: string, useEvents: bool}

toDataAttributes()

Returns data attributes for use in HTML elements (body tag).

public toDataAttributes() : array<string, string|null>
Return values
array<string, string|null>

toQueryParameters()

Returns URL query parameters array (new format).

public toQueryParameters() : array<string, string>
Return values
array<string, string>
On this page

Search results