final |
|---|
Reads a model's translatable fields in the request's language: the column
itself carries the further-language text from sdk_translations,
else its own base value — never English. One LEFT JOIN per field at one language per request, the joined columns
prefixed so the engine's WHERE stays unambiguous; {@see expression()} lets $filter, $orderby and $search run
on the same text (odata 3.2).
Every field is joined on every query — in the base language at no language, matching nothing — so the expression holds whatever the query selects.
| Methods | ||
|---|---|---|
public
|
__construct(LanguagesInterface $languages)
|
# |
public
|
fields(class-string $model): list<string>
|
# |
public
|
apply(Builder $query, ?string $locale): void
|
# |
public
|
expression(string $table, string $field): string
|
# |
public
|
languageOf(?string $locale): string
|
# |