Пример #1
0
 /**
  * function create_group:
  *
  * Creates a new group
  * @param steam_connector $pSteamConnector Connection to sTeam
  * @param string $pName Name of the group
  * @param steam_group $pParentGroup The group, where all future members are in
  * @return steam_group An instance of the new group
  */
 public static function create_group($pSteamConnectorID, $pName, $pParentGroup, $pEnvironment = FALSE, $pDescription = "")
 {
     if (!is_string($pSteamConnectorID)) {
         throw new ParameterException("pSteamConnectorID", "string");
     }
     $pParentGroup->drop_subGroupsLookupCache();
     return steam_factory::create_object($pSteamConnectorID, $pName, CLASS_GROUP, $pEnvironment, array("parentgroup" => $pParentGroup, "attributes" => array(OBJ_DESC => $pDescription)));
 }
Пример #2
0
 private function deleteGroup($groupID)
 {
     $group = new steam_group($GLOBALS["STEAM"]->get_id(), $groupID);
     if ($group != null) {
         foreach ($group->get_subgroups() as $subgroup) {
             $this->deleteGroup($subgroup->get_id());
         }
         $group->delete();
     }
 }