public function revokePermissions($accessLevel)
    {
        // Do not revoke the permissions if we haven't all data
        if ($accessLevel == '') {
            return false;
        }
    
        try {
            $em = $this->entityManager->getDoctrineEntityManager();
            $permissions = $em->getRepository('\\Zepi\\Core\\AccessControl\\Entity\\Permission')->findBy(array(
                'accessLevelKey' => $accessLevel
            ));
            
            foreach ($permissions as $permission) {
                $em->remove($permission);
            }
            $em->flush();
        } catch (\Exception $e) {
            throw new Exception('Cannot revoke the access levels "' . $accessLevel . '".', 0, $e);
        }
    }
public function revokePermissions($accessLevel)
    {
        // Do not revoke the permissions if we haven't all data
        if ($accessLevel == '') {
            return false;
        }
    
        try {
            $em = $this->entityManager->getDoctrineEntityManager();
            $permissions = $em->getRepository('\\Zepi\\Core\\AccessControl\\Entity\\Permission')->findBy(array(
                'accessLevelKey' => $accessLevel
            ));
            
            foreach ($permissions as $permission) {
                $em->remove($permission);
            }
            $em->flush();
        } catch (\Exception $e) {
            throw new Exception('Cannot revoke the access levels "' . $accessLevel . '".', 0, $e);
        }
    }
public function revokePermissions ( $ accessLevel ) { // Do not revoke the permissions if we haven't all data if ( $ accessLevel == '' ) { return false ; } try { $ em = $ this -> entityManager -> getDoctrineEntityManager ( ) ; $ permissions = $ em -> getRepository ( '\\Zepi\\Core\\AccessControl\\Entity\\Permission' ) -> findBy ( array ( 'accessLevelKey' => $ accessLevel ) ) ; foreach ( $ permissions as $ permission ) { $ em -> remove ( $ permission ) ; } $ em -> flush ( ) ; } catch ( \ Exception $ e ) { throw new Exception ( 'Cannot revoke the access levels "' . $ accessLevel . '".' , 0 , $ e ) ; } }
Revokes the permission for the given access level.

@access public
@param string $accessLevel
@return boolean

@throws \Zepi\Core\AccessControl\Exception Cannot revoke the access levels "{accessLevel}".
Revokes the permission for the given access level .