By default, this method will return the field definition name in current language if translation is present. If not, main language will be used.
If $forcedLanguage is provided, will return the field definition name in this language, if translation is present.
public getTranslatedFieldDefinitionProperty ( eZ\Publish\API\Repository\Values\ContentType\ContentType $contentType, string $fieldDefIdentifier, string $property = 'name', string $forcedLanguage = null ) : string | null | ||
$contentType | eZ\Publish\API\Repository\Values\ContentType\ContentType | |
$fieldDefIdentifier | string | Field Definition identifier |
$property | string | Specifies if 'name' or 'description' should be used |
$forcedLanguage | string | Locale we want the field definition name translated in in (e.g. "fre-FR"). Null by default (takes current locale) |
Результат | string | null |