◆ __construct()
Galette\Repository\Groups::__construct |
( |
Db |
$zdb, |
|
|
Login |
$login |
|
) |
| |
Constructor
- Parameters
-
Db | $zdb | Database instance |
Login | $login | Login instance |
◆ addMemberToGroups()
static Galette\Repository\Groups::addMemberToGroups |
( |
Adherent |
$adh, |
|
|
array |
$groups, |
|
|
bool |
$manager = false , |
|
|
bool |
$transaction = false |
|
) |
| |
|
static |
Add a member to specified groups
- Parameters
-
Adherent | $adh | Member |
| array<string> | $groups Groups Groups list. Each entry must contain the group id, name each value separated by a pipe. |
boolean | $manager | Add member as manager, defaults to false |
boolean | $transaction | Does a SQL transaction already exists? Defaults to false. |
- Returns
- boolean
◆ getManagerUsers()
Galette\Repository\Groups::getManagerUsers |
( |
array |
$groups = [] | ) |
|
Get managed users id list
- Parameters
-
- Returns
- array<int>|false
◆ getSimpleList()
static Galette\Repository\Groups::getSimpleList |
( |
bool |
$as_groups = false | ) |
|
|
static |
Get simple groups list (only id and names)
- Parameters
-
boolean | $as_groups | Retrieve Group[] |
- Returns
- array<int, Group|string>
◆ isUnique()
static Galette\Repository\Groups::isUnique |
( |
Db |
$zdb, |
|
|
string |
$name, |
|
|
?int |
$parent = null , |
|
|
?int |
$current = null |
|
) |
| |
|
static |
Check if groupname is unique
- Parameters
-
Db | $zdb | Database instance |
string | $name | Requested name |
int | null | $parent | Parent group (defaults to null) |
int | null | $current | Current ID to be excluded (defaults to null) |
- Returns
- boolean
◆ loadGroups()
static Galette\Repository\Groups::loadGroups |
( |
int |
$id, |
|
|
bool |
$managed = false , |
|
|
bool |
$as_group = true |
|
) |
| |
|
static |
Loads groups for specific member
- Parameters
-
int | $id | Member id |
boolean | $managed | Retrieve managed groups (defaults to false) |
boolean | $as_group | Retrieve Group[] or int[] |
- Returns
- array<int, Group|int>
◆ loadManagedGroups()
static Galette\Repository\Groups::loadManagedGroups |
( |
int |
$id, |
|
|
bool |
$as_group = true |
|
) |
| |
|
static |
Loads managed groups for specific member
- Parameters
-
int | $id | Member id |
boolean | $as_group | Retrieve Group[] or int[] |
- Returns
- array<int, Group|int>
◆ removeMemberFromGroups()
static Galette\Repository\Groups::removeMemberFromGroups |
( |
int |
$id | ) |
|
|
static |
Remove member from all his groups
- Parameters
-
- Returns
- void
◆ removeMembersFromGroups()
static Galette\Repository\Groups::removeMembersFromGroups |
( |
array |
$ids | ) |
|
|
static |
Remove members from all their groups
- Parameters
-
- Returns
- void
The documentation for this class was generated from the following file:
- /home/docs/checkouts/readthedocs.org/user_builds/galette-apidoc/checkouts/develop/galette/lib/Galette/Repository/Groups.php