Helper/EntityHelper.php
public function getEntityClassFull($entity)
    {
        $entity = $this->toString($entity);

        if (isset($this->cache[$entity])) {
            return $entity;
        }

        if ($this->managed || $this->isManagedByDoctrine($entity)) {
            /** @var \Doctrine\Common\Persistence\Mapping\ClassMetadata $classMetaData */
            $classMetaData        = $this->entityManager->getClassMetadata($entity);
            $entity               = $classMetaData->getName();
            $this->cache[$entity] = ['metadata' => $classMetaData];
            $this->managed        = false;
        } else {
            $this->cache[$entity] = [];
        }

        return $entity;
    }
public function getEntityClassFull($entity)
    {
        $entity = $this->toString($entity);

        if (isset($this->cache[$entity])) {
            return $entity;
        }

        if ($this->managed || $this->isManagedByDoctrine($entity)) {
            /** @var \Doctrine\Common\Persistence\Mapping\ClassMetadata $classMetaData */
            $classMetaData        = $this->entityManager->getClassMetadata($entity);
            $entity               = $classMetaData->getName();
            $this->cache[$entity] = ['metadata' => $classMetaData];
            $this->managed        = false;
        } else {
            $this->cache[$entity] = [];
        }

        return $entity;
    }
public function getEntityClassFull ( $ entity ) { $ entity = $ this -> toString ( $ entity ) ; if ( isset ( $ this -> cache [ $ entity ] ) ) { return $ entity ; } if ( $ this -> managed || $ this -> isManagedByDoctrine ( $ entity ) ) { /** @var \Doctrine\Common\Persistence\Mapping\ClassMetadata $classMetaData */ $ classMetaData = $ this -> entityManager -> getClassMetadata ( $ entity ) ; $ entity = $ classMetaData -> getName ( ) ; $ this -> cache [ $ entity ] = [ 'metadata' => $ classMetaData ] ; $ this -> managed = false ; } else { $ this -> cache [ $ entity ] = [ ] ; } return $ entity ; }
Returns full name of the received entity or class name.

@param object|string $entity Entity object or just entity name in the full or shot notation

@return string For example 'AcmeBundle\Entity\User'
Returns full name of the received entity or class name .