TcaInputPlaceholders implements FormDataProviderInterface

Resolve placeholders for fields of type input or text. The placeholder value in the processedTca section of the result will be replaced with the resolved value.

Table of Contents

Interfaces

FormDataProviderInterface
Interface must be implemented by form data provider classes.

Methods

addData()  : array<string|int, mixed>
Resolve placeholders for input/email/text fields. Placeholders that are simple strings will be returned unmodified. Placeholders beginning with __row are being resolved, possibly traversing multiple tables.
getAllowedTableForGroupField()  : bool|string
Will read the "allowed" value from the given field configuration and returns FALSE if none or more than one has been defined.
getLanguageService()  : LanguageService
getPlaceholderValue()  : string
Recursively resolve the placeholder value. A placeholder string with a syntax of __row|field1|field2|field3 will be recursively resolved to a final value.
getPossibleUidsByCurrentSysLanguage()  : array<string|int, mixed>
E.g. sys_file is not translatable, thus the uid of the translation of it's metadata has to be retrieved here.
getRelatedFormData()  : array<string|int, mixed>
Compile a formdata result set based on the tablename and record uid.
getRelatedGroupFieldUids()  : array<string|int, mixed>
Return uids of related records for group type fields. Uids consisting of multiple parts like [table]_[uid]|[title] will be reduced to integers and validated against the allowed table. Uids without a table prefix are accepted in any case.

Methods

addData()

Resolve placeholders for input/email/text fields. Placeholders that are simple strings will be returned unmodified. Placeholders beginning with __row are being resolved, possibly traversing multiple tables.

public addData(array<string|int, mixed> $result) : array<string|int, mixed>
Parameters
$result : array<string|int, mixed>

Initialized result array

Return values
array<string|int, mixed>

getAllowedTableForGroupField()

Will read the "allowed" value from the given field configuration and returns FALSE if none or more than one has been defined.

protected getAllowedTableForGroupField(array<string|int, mixed> $fieldConfig) : bool|string

Otherwise the name of the allowed table will be returned.

Parameters
$fieldConfig : array<string|int, mixed>

TCA "config" section for the group type field.

Return values
bool|string

getPlaceholderValue()

Recursively resolve the placeholder value. A placeholder string with a syntax of __row|field1|field2|field3 will be recursively resolved to a final value.

protected getPlaceholderValue(array<string|int, mixed> $fieldNameArray, array<string|int, mixed> $result[, int $recursionLevel = 0 ]) : string
Parameters
$fieldNameArray : array<string|int, mixed>
$result : array<string|int, mixed>
$recursionLevel : int = 0
Return values
string

getPossibleUidsByCurrentSysLanguage()

E.g. sys_file is not translatable, thus the uid of the translation of it's metadata has to be retrieved here.

protected getPossibleUidsByCurrentSysLanguage(array<string|int, mixed> $possibleUids, string $foreignTableName, int $currentLanguage) : array<string|int, mixed>

Get the uid of e.g. a file metadata entry for a given sys_language_uid and the possible translated data. If there is no translation available, return the uid of default language. If there is no value at all, return the "possible uids".

Parameters
$possibleUids : array<string|int, mixed>
$foreignTableName : string
$currentLanguage : int
Return values
array<string|int, mixed>

getRelatedFormData()

Compile a formdata result set based on the tablename and record uid.

protected getRelatedFormData(array<string|int, mixed> $result, string $tableName, int $uid, string $columnToProcess) : array<string|int, mixed>
Parameters
$result : array<string|int, mixed>
$tableName : string

Name of the table for which to compile formdata

$uid : int

UID of the record for which to compile the formdata

$columnToProcess : string

The column that is required from the record

Return values
array<string|int, mixed>

The compiled formdata

getRelatedGroupFieldUids()

Return uids of related records for group type fields. Uids consisting of multiple parts like [table]_[uid]|[title] will be reduced to integers and validated against the allowed table. Uids without a table prefix are accepted in any case.

protected getRelatedGroupFieldUids(array<string|int, mixed> $fieldConfig, string $value) : array<string|int, mixed>
Parameters
$fieldConfig : array<string|int, mixed>

TCA "config" section for the group type field.

$value : string

A comma separated list of records

Return values
array<string|int, mixed>

        
On this page

Search results