示例#1
0
 /**
  * Enter description here...
  *
  */
 public function delete()
 {
     if (!$this->_mapper->countGroupMembers($this)) {
         foreach ($this->getChildren() as $obGroup) {
             $this->_mapper->tree->removeNode($obGroup);
             $obGroup->delete();
         }
         $this->_mapper->tree->removeNode($this);
         return parent::delete();
     } else {
         $res = new RM_Base_Result();
         $res->error('cannot_delete_group_with_users');
         throw new RM_Validator_Exception($res);
     }
 }