public function getModelName($entity) {
        $classRef = new \ReflectionClass($entity);
        $classModelAnnotation = $this->annoReader->getClassAnnotation($classRef, 'Tpg\ExtjsBundle\Annotation\Model');
        if ($classModelAnnotation !== null) {
            if ($classModelAnnotation->name) {
                return $classModelAnnotation->name;
            } else {
                return str_replace("\\", ".", $classRef->getName());
            }
        }
        return null;
    }
public function getModelName($entity) {
        $classRef = new \ReflectionClass($entity);
        $classModelAnnotation = $this->annoReader->getClassAnnotation($classRef, 'Tpg\ExtjsBundle\Annotation\Model');
        if ($classModelAnnotation !== null) {
            if ($classModelAnnotation->name) {
                return $classModelAnnotation->name;
            } else {
                return str_replace("\\", ".", $classRef->getName());
            }
        }
        return null;
    }
public function getModelName ( $ entity ) { $ classRef = new \ ReflectionClass ( $ entity ) ; $ classModelAnnotation = $ this -> annoReader -> getClassAnnotation ( $ classRef , 'Tpg\ExtjsBundle\Annotation\Model' ) ; if ( $ classModelAnnotation !== null ) { if ( $ classModelAnnotation -> name ) { return $ classModelAnnotation -> name ; } else { return str_replace ( "\\" , "." , $ classRef -> getName ( ) ) ; } } return null ; }
Get model name of an entity
@param $entity string Class name of the entity
Get model name of an entity