public function getAccessEntityForName($class, $name)
    {
        try {
            $em = $this->entityManager->getDoctrineEntityManager();
            $accessEntity = $em->getRepository($class)->findOneBy(array(
                'name' => $name,
            ));
            
            if ($accessEntity !== null) {
                $this->loadPermissions($accessEntity);
            
                return $accessEntity;
            }
            
            return false;
        } catch (\Exception $e) {
            throw new Exception('Cannot load the access entitiy for the given class "' . $class . '" and name "' . $name . '".', 0, $e);
        }
    }
public function getAccessEntityForName($class, $name)
    {
        try {
            $em = $this->entityManager->getDoctrineEntityManager();
            $accessEntity = $em->getRepository($class)->findOneBy(array(
                'name' => $name,
            ));
            
            if ($accessEntity !== null) {
                $this->loadPermissions($accessEntity);
            
                return $accessEntity;
            }
            
            return false;
        } catch (\Exception $e) {
            throw new Exception('Cannot load the access entitiy for the given class "' . $class . '" and name "' . $name . '".', 0, $e);
        }
    }
public function getAccessEntityForName ( $ class , $ name ) { try { $ em = $ this -> entityManager -> getDoctrineEntityManager ( ) ; $ accessEntity = $ em -> getRepository ( $ class ) -> findOneBy ( array ( 'name' => $ name , ) ) ; if ( $ accessEntity !== null ) { $ this -> loadPermissions ( $ accessEntity ) ; return $ accessEntity ; } return false ; } catch ( \ Exception $ e ) { throw new Exception ( 'Cannot load the access entitiy for the given class "' . $ class . '" and name "' . $ name . '".' , 0 , $ e ) ; } }
Returns the access entity object for the given type and name

@access public
@param string $class
@param string $name
@return false|\Zepi\Core\AccessControl\Entity\AccessEntity

@throws \Zepi\Core\AccessControl\Exception Cannot load access entitiy from the database for the given class "{class}" and name "{name}".
Returns the access entity object for the given type and name