SchemaLabelResolver

Read onlyYes

Resolves labels for TCA field items based on schema configuration and optional Page TSconfig overrides.

Returns raw (untranslated) labels — callers are responsible for running language translation (e.g. sL()) when needed.

Attributes
#[Autoconfigure]
$public: true

Table of Contents

Methods

__construct()  : mixed
getLabelForFieldValue()  : string
Resolve the label for a single field item value.
getLabelsForFieldValues()  : array<string|int, string>
Resolve labels for a comma-separated list of field item values.

Methods

getLabelForFieldValue()

Resolve the label for a single field item value.

public getLabelForFieldValue(string $table, string $field, string $value[, array<string|int, mixed> $row = [] ][, array<string|int, mixed> $columnTsConfig = [] ][, array<string|int, mixed> $fieldConfiguration = [] ]) : string
Parameters
$table : string

Table name

$field : string

Field name

$value : string

The item value to look up

$row : array<string|int, mixed> = []

Record row, needed for itemsProcFunc/itemsProcessors context

$columnTsConfig : array<string|int, mixed> = []

Optional TCEFORM.

. TSconfig array for addItems/altLabels overrides

$fieldConfiguration : array<string|int, mixed> = []

Optional explicit field configuration (used for volatile configs like FlexForms)

Return values
string

The raw (untranslated) label, or empty string if not found

getLabelsForFieldValues()

Resolve labels for a comma-separated list of field item values.

public getLabelsForFieldValues(string $table, string $field, string $valueList[, array<string|int, mixed> $row = [] ][, array<string|int, mixed> $columnTsConfig = [] ][, array<string|int, mixed> $fieldConfiguration = [] ]) : array<string|int, string>
Parameters
$table : string

Table name

$field : string

Field name

$valueList : string

Comma-separated list of item values

$row : array<string|int, mixed> = []

Record row, needed for itemsProcFunc/itemsProcessors context

$columnTsConfig : array<string|int, mixed> = []

Optional TCEFORM.

. TSconfig array for addItems/altLabels overrides

$fieldConfiguration : array<string|int, mixed> = []

Optional explicit field configuration (used for volatile configs like FlexForms)

Return values
array<string|int, string>

Array of raw (untranslated) labels for each matched value


        
On this page

Search results