Rest/Field/Value.php
public function getConfiguredFieldIdentifier($fieldName, ContentType $contentType)
    {
        $contentTypeName = $contentType->identifier;

        if (isset($this->parameters['fieldIdentifiers'])) {
            $fieldIdentifiers = $this->parameters['fieldIdentifiers'];

            if (isset($fieldIdentifiers[$fieldName]) && !empty($fieldIdentifiers[$fieldName][$contentTypeName])) {
                return $fieldIdentifiers[$fieldName][$contentTypeName];
            }
        }

        return $fieldName;
    }
public function getConfiguredFieldIdentifier($fieldName, ContentType $contentType)
    {
        $contentTypeName = $contentType->identifier;

        if (isset($this->parameters['fieldIdentifiers'])) {
            $fieldIdentifiers = $this->parameters['fieldIdentifiers'];

            if (isset($fieldIdentifiers[$fieldName]) && !empty($fieldIdentifiers[$fieldName][$contentTypeName])) {
                return $fieldIdentifiers[$fieldName][$contentTypeName];
            }
        }

        return $fieldName;
    }
public function getConfiguredFieldIdentifier ( $ fieldName , ContentType $ contentType ) { $ contentTypeName = $ contentType -> identifier ; if ( isset ( $ this -> parameters [ 'fieldIdentifiers' ] ) ) { $ fieldIdentifiers = $ this -> parameters [ 'fieldIdentifiers' ] ; if ( isset ( $ fieldIdentifiers [ $ fieldName ] ) && ! empty ( $ fieldIdentifiers [ $ fieldName ] [ $ contentTypeName ] ) ) { return $ fieldIdentifiers [ $ fieldName ] [ $ contentTypeName ] ; } } return $ fieldName ; }
Returns field name.

To define another field name for specific value (e. g. author) add it to parameters.yml

For example:

ez_recommendation.field_identifiers:
author:
blog_post: authors
image:
blog_post: thumbnail

@param string $fieldName
@param \eZ\Publish\API\Repository\Values\ContentType\ContentType $contentType

@return string
Returns field name .