ElementBrowserParameters implements JsonSerializable

Read onlyYes
FinalYes

Data Transfer Object for Element Browser parameters.

Replaces the legacy pipe-delimited bparams string with a proper typed object for cleaner communication between FormEngine and ElementBrowser.

Legacy bparams format: "fieldRef|rteParams|rteConfig|allowedTypes|irreObjectId" Example: "data[tt_content][123][image]|||gif,jpg|data-4-pages-4-nav_icon"

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
$rteConfiguration  : string
$rteParameters  : string
$useEvents  : bool

Methods

__construct()  : mixed
fromBparams()  : self
Creates an instance from the legacy pipe-delimited bparams string.
fromRequest()  : self
Creates an instance from the current HTTP request.
getAllowedFileExtensions()  : string[]
Returns the allowed file extensions as an array.
getAllowedTables()  : string[]
Parses the allowed tables from the allowedTypes field.
getDisallowedFileExtensions()  : 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
toArray()  : array{fieldReference: string, rteParameters: string, rteConfiguration: string, allowedTypes: string, disallowedFileExtensions: string, irreObjectId: string, useEvents: bool}
Returns array representation of the parameters.
toBparams()  : string
Converts the parameters back to the legacy pipe-delimited bparams string.
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 = ''

$rteConfiguration

public string $rteConfiguration = ''

$rteParameters

public string $rteParameters = ''

Methods

__construct()

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

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

$rteParameters : string = ''

Legacy RTE parameters (editorNo:contentTypo3Language) - deprecated, kept for BC @deprecated Remove in v15.0

$rteConfiguration : string = ''

Legacy RTE configuration (RTEtsConfigParams) - deprecated, kept for BC @deprecated Remove in v15.0

$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

fromBparams()

Creates an instance from the legacy pipe-delimited bparams string.

public static fromBparams(string $bparams) : self
Deprecated

Remove in v15.0: This method only exists for backward compatibility with the legacy bparams format.

Parameters
$bparams : string

Legacy bparams string (e.g., "data[tt_content][123][image]|||gif,jpg|data-4-pages-4-nav_icon")

Return values
self

fromRequest()

Creates an instance from the current HTTP request.

public static fromRequest(ServerRequestInterface $request) : self

Supports both legacy bparams parameter and new separate parameters for backward compatibility.

Parameters
$request : ServerRequestInterface
Return values
self

getAllowedFileExtensions()

Returns the allowed file extensions as an array.

public getAllowedFileExtensions() : string[]
Return values
string[] —

List of allowed file extensions

getAllowedTables()

Parses the allowed tables from the allowedTypes field.

public getAllowedTables() : string[]
Return values
string[] —

List of allowed table names

getDisallowedFileExtensions()

Returns the disallowed file extensions as an array.

public getDisallowedFileExtensions() : string[]
Return values
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
Return values
array

toArray()

Returns array representation of the parameters.

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

toBparams()

Converts the parameters back to the legacy pipe-delimited bparams string.

public toBparams() : string
Deprecated

remove this method in v15.0: This method only exists for backward compatibility with the legacy bparams format.

Return values
string —

Legacy bparams format

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