示例#1
0
 /**
  * @param \Claroline\CoreBundle\Entity\Role $role
  *
  * @throws RoleReadOnlyException
  */
 public function remove(Role $role)
 {
     if ($role->isReadOnly()) {
         throw new RoleReadOnlyException('This role cannot be removed');
     }
     $this->om->remove($role);
     $this->om->flush();
 }