示例#1
0
 /**
  * Adds new group.
  *
  * @param string $name
  * @param boolean $moderated
  */
 public function addGroup($name, $moderated = true)
 {
     if ($this->service->findGroupByName($name) !== null) {
         trigger_error('Cant add group `' . $name . '`! Duplicate entry!', E_NOTICE);
         return;
     }
     $group = new BOL_AuthorizationGroup();
     $group->name = $name;
     $group->moderated = $moderated;
     $this->service->saveGroup($group);
 }