mirror of
https://github.com/pierre42100/ComunicAPI
synced 2024-11-23 22:09:29 +00:00
Added registration levels
This commit is contained in:
parent
fd4259c38d
commit
e35323915f
@ -15,12 +15,10 @@ class GroupInfo extends BaseUniqueObject {
|
|||||||
const PRIVATE_GROUP = 1;
|
const PRIVATE_GROUP = 1;
|
||||||
const SECRET_GROUP = 2;
|
const SECRET_GROUP = 2;
|
||||||
|
|
||||||
//Private fields
|
//Registration levels
|
||||||
private $name;
|
const OPEN_REGISTRATION = 0;
|
||||||
private $number_members = -1;
|
const MODERATED_REGISTRATION = 1;
|
||||||
private $logo;
|
const CLOSED_REGISTRATION = 2;
|
||||||
private $membership_level = -1;
|
|
||||||
private $visiblity = -1;
|
|
||||||
|
|
||||||
//User access to a group
|
//User access to a group
|
||||||
const NO_ACCESS = 0; //Can not even know if the group exists or not
|
const NO_ACCESS = 0; //Can not even know if the group exists or not
|
||||||
@ -37,6 +35,14 @@ class GroupInfo extends BaseUniqueObject {
|
|||||||
const INVITED = 3;
|
const INVITED = 3;
|
||||||
const PENDING = 4;
|
const PENDING = 4;
|
||||||
const VISITOR = 5;
|
const VISITOR = 5;
|
||||||
|
|
||||||
|
//Private fields
|
||||||
|
private $name;
|
||||||
|
private $number_members = -1;
|
||||||
|
private $logo;
|
||||||
|
private $membership_level = -1;
|
||||||
|
private $visiblity = -1;
|
||||||
|
private $registration_level = -1;
|
||||||
|
|
||||||
//Get and set the name of group
|
//Get and set the name of group
|
||||||
public function set_name(string $name){
|
public function set_name(string $name){
|
||||||
@ -117,4 +123,17 @@ class GroupInfo extends BaseUniqueObject {
|
|||||||
public function get_visibility() : int {
|
public function get_visibility() : int {
|
||||||
return $this->visibility;
|
return $this->visibility;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Get and set registration levels
|
||||||
|
public function set_registration_level(int $registration_level){
|
||||||
|
$this->registration_level = $registration_level;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function has_registration_level() : bool {
|
||||||
|
return $this->registration_level > -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function get_registration_level() : int {
|
||||||
|
return $this->registration_level;
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user