private function getTranslatableFields($className)
    {
        // Here we use reflection to get the class
        $reflectionClass = new \ReflectionClass($className);
        $translatableFields = array();
        // and its entities
        $reflectionProperties = $reflectionClass->getProperties();
        foreach ($reflectionProperties as $reflectionProperty) {
            // We use the annotation reader to get the properties annotated with the "Translatable" annotation
            $propertyAnnotation = $this->annotationReader->getPropertyAnnotation($reflectionProperty, 'Gedmo\Mapping\Annotation\Translatable');
            if ($propertyAnnotation) {
                // In this case we have to get the property name and its type in the mapping annotation
                $mappingAnnotation = $this->annotationReader->getPropertyAnnotation($reflectionProperty, 'Doctrine\ORM\Mapping\Column');
                $translatableFields[$reflectionProperty->getName()] = $mappingAnnotation->type;
            }
        }
        return $translatableFields;
    }
private function getTranslatableFields($className)
    {
        // Here we use reflection to get the class
        $reflectionClass = new \ReflectionClass($className);
        $translatableFields = array();
        // and its entities
        $reflectionProperties = $reflectionClass->getProperties();
        foreach ($reflectionProperties as $reflectionProperty) {
            // We use the annotation reader to get the properties annotated with the "Translatable" annotation
            $propertyAnnotation = $this->annotationReader->getPropertyAnnotation($reflectionProperty, 'Gedmo\Mapping\Annotation\Translatable');
            if ($propertyAnnotation) {
                // In this case we have to get the property name and its type in the mapping annotation
                $mappingAnnotation = $this->annotationReader->getPropertyAnnotation($reflectionProperty, 'Doctrine\ORM\Mapping\Column');
                $translatableFields[$reflectionProperty->getName()] = $mappingAnnotation->type;
            }
        }
        return $translatableFields;
    }
private function getTranslatableFields ( $ className ) { // Here we use reflection to get the class $ reflectionClass = new \ ReflectionClass ( $ className ) ; $ translatableFields = array ( ) ; // and its entities $ reflectionProperties = $ reflectionClass -> getProperties ( ) ; foreach ( $ reflectionProperties as $ reflectionProperty ) { // We use the annotation reader to get the properties annotated with the "Translatable" annotation $ propertyAnnotation = $ this -> annotationReader -> getPropertyAnnotation ( $ reflectionProperty , 'Gedmo\Mapping\Annotation\Translatable' ) ; if ( $ propertyAnnotation ) { // In this case we have to get the property name and its type in the mapping annotation $ mappingAnnotation = $ this -> annotationReader -> getPropertyAnnotation ( $ reflectionProperty , 'Doctrine\ORM\Mapping\Column' ) ; $ translatableFields [ $ reflectionProperty -> getName ( ) ] = $ mappingAnnotation -> type ; } } return $ translatableFields ; }
Private method to get the list of the translatable fields of a given entity.

@param $className string The class to look mapping infos for.
@return array an array containing the list of the translatable fields associated to their type.
Private method to get the list of the translatable fields of a given entity .