public function getTranslationData($entity, Property $property)
    {
        $metadata = $this->metadataCollection->getMetadata($entity);
        if($metadata === null) {
            return null;
        }

        $metaProperty = $metadata->getProperty($property->getName());

        if($metaProperty === null) {
            throw new TranslationException(
                sprintf('The property "%s" was used for translation, but no metadata was found. Maybe you forgot to define one for the entity "%s"',
                $property->getName(),
                get_class($entity)
            ));
        }

        $strategy = $this->strategyResolver->getStrategy($metaProperty->getStrategy());
        return $strategy->getTranslationData($entity, $metaProperty, $metadata);
    }
public function getTranslationData($entity, Property $property)
    {
        $metadata = $this->metadataCollection->getMetadata($entity);
        if($metadata === null) {
            return null;
        }

        $metaProperty = $metadata->getProperty($property->getName());

        if($metaProperty === null) {
            throw new TranslationException(
                sprintf('The property "%s" was used for translation, but no metadata was found. Maybe you forgot to define one for the entity "%s"',
                $property->getName(),
                get_class($entity)
            ));
        }

        $strategy = $this->strategyResolver->getStrategy($metaProperty->getStrategy());
        return $strategy->getTranslationData($entity, $metaProperty, $metadata);
    }
public function getTranslationData ( $ entity , Property $ property ) { $ metadata = $ this -> metadataCollection -> getMetadata ( $ entity ) ; if ( $ metadata === null ) { return null ; } $ metaProperty = $ metadata -> getProperty ( $ property -> getName ( ) ) ; if ( $ metaProperty === null ) { throw new TranslationException ( sprintf ( 'The property "%s" was used for translation, but no metadata was found. Maybe you forgot to define one for the entity "%s"' , $ property -> getName ( ) , get_class ( $ entity ) ) ) ; } $ strategy = $ this -> strategyResolver -> getStrategy ( $ metaProperty -> getStrategy ( ) ) ; return $ strategy -> getTranslationData ( $ entity , $ metaProperty , $ metadata ) ; }
Return the translation data, that is already stored in the database

@param $entity
@param Property $property
@return null
@throws \Exception
Return the translation data that is already stored in the database