public function isEntity($entity)
    {
        return is_object($entity)
               && !$this->getEntityManager()->getMetadataFactory()->isTransient(ClassUtils::getClass($entity));
    }
public function isEntity($entity)
    {
        return is_object($entity)
               && !$this->getEntityManager()->getMetadataFactory()->isTransient(ClassUtils::getClass($entity));
    }
public function isEntity ( $ entity ) { return is_object ( $ entity ) && ! $ this -> getEntityManager ( ) -> getMetadataFactory ( ) -> isTransient ( ClassUtils :: getClass ( $ entity ) ) ; }
Indicates whether the given argument is an entity.

@param mixed $entity

@return bool
Indicates whether the given argument is an entity .