Group
The Group model.
See Also
Summary
| Group | The Group model. |
| Variables | |
| $permissionCache | Caches the permissions of every group so they don’t have to be parsed on every grab. |
| Functions | |
| __construct | Model::grab |
| find | Model::search |
| can | Checks if the group can perform the specified functions. |
| add | Adds a group to the database with the passed Name and Permissions array. |
| update | Updates a group with the given name and permissions, and passes arguments to the update_group trigger.. |
| delete | Deletes a given group. Calls the “delete_group” trigger and passes the Group as an argument. |
| add_permission | Adds a permission to the Groups table. |
| remove_permission | Removes a permission from the Groups table. |
| size | Returns the amount of users in the. |
| members | Returns all the members of the group. |
| edit_link | Outputs an edit link for the group, if the user can. |
| delete_link | Outputs an delete link for the group, if the user can. |
delete
| static function delete( | $id | ) |
Deletes a given group. Calls the “delete_group” trigger and passes the Group as an argument.
Parameters
| $id | The group to delete. |