eZ\Publish\Core\MVC\Symfony\Templating\Twig\Extension\ContentExtension::getTranslatedFieldValue PHP Метод

getTranslatedFieldValue() публичный Метод

public getTranslatedFieldValue ( eZ\Publish\API\Repository\Values\Content\Content $content, string $fieldDefIdentifier, string $forcedLanguage = null ) : mixed
$content eZ\Publish\API\Repository\Values\Content\Content
$fieldDefIdentifier string Identifier for the field we want to get the value from.
$forcedLanguage string Locale we want the content name translation in (e.g. "fre-FR"). Null by default (takes current locale).
Результат mixed A primitive type or a field type Value object depending on the field type.
    public function getTranslatedFieldValue(Content $content, $fieldDefIdentifier, $forcedLanguage = null)
    {
        return $this->translationHelper->getTranslatedField($content, $fieldDefIdentifier, $forcedLanguage)->value;
    }