public function addRole($sRoleKey) { if ($this->iGroupId === null) { self::$ROLES[] = $sRoleKey; return; } $oGroupRole = new GroupRole(); $oGroupRole->setRoleKey($sRoleKey); $oGroupRole->setGroupId($this->iGroupId); return $oGroupRole->save(); }
public function addRole($sRoleKey) { if ($this->iGroupId === null) { self::$ROLES[] = $sRoleKey; return; } $oGroupRole = new GroupRole(); $oGroupRole->setRoleKey($sRoleKey); $oGroupRole->setGroupId($this->iGroupId); return $oGroupRole->save(); }