public function has($class, $entityId)
    {
        try {
            $em = $this->entityManager->getDoctrineEntityManager();
            $data = $em->getRepository($class)->findOneBy(array(
                'id' => $entityId,
            ));
             
            if ($data !== null) {
                return true;
            }
             
            return false;
        } catch (\Exception $e) {
            throw new Exception('Cannot check if there is an access entitiy for the given class "' . $class . '" and id "' . $entityId . '".', 0, $e);
        }
    }
public function has($class, $entityId)
    {
        try {
            $em = $this->entityManager->getDoctrineEntityManager();
            $data = $em->getRepository($class)->findOneBy(array(
                'id' => $entityId,
            ));
             
            if ($data !== null) {
                return true;
            }
             
            return false;
        } catch (\Exception $e) {
            throw new Exception('Cannot check if there is an access entitiy for the given class "' . $class . '" and id "' . $entityId . '".', 0, $e);
        }
    }
public function has ( $ class , $ entityId ) { try { $ em = $ this -> entityManager -> getDoctrineEntityManager ( ) ; $ data = $ em -> getRepository ( $ class ) -> findOneBy ( array ( 'id' => $ entityId , ) ) ; if ( $ data !== null ) { return true ; } return false ; } catch ( \ Exception $ e ) { throw new Exception ( 'Cannot check if there is an access entitiy for the given class "' . $ class . '" and id "' . $ entityId . '".' , 0 , $ e ) ; } }
Returns true if the given entity id exists

@param string $class
@param integer $entityId
@return boolean

@throws \Zepi\Core\AccessControl\Exception Cannot check if there is an access entitiy for the given class "{class}" and id "{entityId}".
Returns true if the given entity id exists