ElementBrowserParameters implements JsonSerializable
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"
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
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() : 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<string, string>
- 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 = '' ]) : 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"
fromBparams()
Creates an instance from the legacy pipe-delimited bparams string.
public
static fromBparams(string $bparams) : self
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
selffromRequest()
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
selfgetAllowedFileExtensions()
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<string, string>
Return values
array<string, string>toBparams()
Converts the parameters back to the legacy pipe-delimited bparams string.
public
toBparams() : string
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>