Core/MetaNameSchema.php
protected function handleRelationValue(RelationValue $value, $languageCode)
    {
        if (!$value->destinationContentId) {
            return '';
        }
        $relatedContent = $this->repository->getContentService()->loadContent($value->destinationContentId);
        // @todo: we can probably be better here and handle more than just "image"
        if ($fieldImageValue = $relatedContent->getFieldValue('image')) {
            if ($fieldImageValue->uri) {
                return $this->getVariation($fieldImageValue, "image", $languageCode, "social_network_image");
            }
        }

        return $this->translationHelper->getTranslatedContentName($relatedContent, $languageCode);
    }
protected function handleRelationValue(RelationValue $value, $languageCode)
    {
        if (!$value->destinationContentId) {
            return '';
        }
        $relatedContent = $this->repository->getContentService()->loadContent($value->destinationContentId);
        // @todo: we can probably be better here and handle more than just "image"
        if ($fieldImageValue = $relatedContent->getFieldValue('image')) {
            if ($fieldImageValue->uri) {
                return $this->getVariation($fieldImageValue, "image", $languageCode, "social_network_image");
            }
        }

        return $this->translationHelper->getTranslatedContentName($relatedContent, $languageCode);
    }
protected function handleRelationValue ( RelationValue $ value , $ languageCode ) { if ( ! $ value -> destinationContentId ) { return '' ; } $ relatedContent = $ this -> repository -> getContentService ( ) -> loadContent ( $ value -> destinationContentId ) ; // @todo: we can probably be better here and handle more than just "image" if ( $ fieldImageValue = $ relatedContent -> getFieldValue ( 'image' ) ) { if ( $ fieldImageValue -> uri ) { return $ this -> getVariation ( $ fieldImageValue , "image" , $ languageCode , "social_network_image" ) ; } } return $ this -> translationHelper -> getTranslatedContentName ( $ relatedContent , $ languageCode ) ; }
Get the Relation in text or URL

@param RelationValue $value
@param string        $languageCode

@return string
Get the Relation in text or URL