Documentation

GroupManager extends StaticFactory

User Extended by Shawn Clake Class GroupManager User Extended is licensed under the MIT license.

Tags
author

Shawn Clake shawn.clake@gmail.com

link
https://github.com/ShawnClake/UserExtended
license

https://github.com/ShawnClake/UserExtended/blob/master/LICENSE MIT

Handles all interaction across groups on a global level rather than a user level.

Table of Contents

$groups  : mixed
A collection of groups
__callStatic()  : mixed
Main factory function which utilizes PHP's magic method to call a suffixed factory function on the child class.
allGroups()  :
allGroupsFactory()  : $this
Creates and fills the class with all of the groups that exist in the applciation
countGroupRoles()  : bool
Returns a count of how many roles there are in a specific group.
countGroups()  : mixed
Returns a count of how many groups there are
createGroup()  : GroupsExtended
Creates a new group and returns it after saved
deleteGroup()  : mixed
Deletes a group
factory()  : mixed
Helper function which can also be used to simply create an instance of a child class in cases where initialization functions aren't needed.
findGroup()  : mixed
Returns a group model where the group code is: code=$code
fixGroupSort()  : mixed
Fixes the group sort order
getGroups()  : mixed
Returns the collection of groups.
getSortedGroups()  : array<string|int, mixed>
Returns a set of groups sorted by sort order
seedBasicUserGroups()  : mixed
Seeds default basic user groups for the application
updateGroup()  : bool|Validator
Updates a group

Properties

Methods

__callStatic()

Main factory function which utilizes PHP's magic method to call a suffixed factory function on the child class.

public static __callStatic( $name,  $arguments) : mixed
Parameters
$name :
$arguments :
Return values
mixed

allGroups()

public static allGroups() :

GroupManager

Return values

allGroupsFactory()

Creates and fills the class with all of the groups that exist in the applciation

public allGroupsFactory() : $this
Return values
$this

countGroupRoles()

Returns a count of how many roles there are in a specific group.

public countGroupRoles( $groupCode) : bool
Parameters
$groupCode :
Return values
bool

countGroups()

Returns a count of how many groups there are

public countGroups() : mixed
Return values
mixed

createGroup()

Creates a new group and returns it after saved

public static createGroup( $name,  $description,  $code) : GroupsExtended
Parameters
$name :
$description :
$code :
Return values
GroupsExtended

deleteGroup()

Deletes a group

public static deleteGroup( $groupCode) : mixed
Parameters
$groupCode :
Return values
mixed

factory()

Helper function which can also be used to simply create an instance of a child class in cases where initialization functions aren't needed.

public static factory() : mixed

Generally you will want to use the static magic method below.

Return values
mixed

findGroup()

Returns a group model where the group code is: code=$code

public static findGroup( $code) : mixed
Parameters
$code :
Return values
mixed

fixGroupSort()

Fixes the group sort order

public static fixGroupSort() : mixed
Return values
mixed

getGroups()

Returns the collection of groups.

public getGroups() : mixed
Return values
mixed

getSortedGroups()

Returns a set of groups sorted by sort order

public static getSortedGroups() : array<string|int, mixed>
Return values
array<string|int, mixed>

seedBasicUserGroups()

Seeds default basic user groups for the application

public static seedBasicUserGroups() : mixed
Return values
mixed

updateGroup()

Updates a group

public static updateGroup( $groupCode[, null $name = null ][, null $description = null ][, null $code = null ]) : bool|Validator
Parameters
$groupCode :
$name : null = null
$description : null = null
$code : null = null
Return values
bool|Validator

Search results