Skip to content
This repository has been archived by the owner on Jan 23, 2020. It is now read-only.

Latest commit

 

History

History
76 lines (60 loc) · 1.46 KB

File metadata and controls

76 lines (60 loc) · 1.46 KB

$Group - is system object, that provides groups manipulating interface, instance can be obtained in such way:

<?php
$Group = \cs\Group::instance();
###[Up](#) Methods

$Group object has next public methods:

  • add()
  • get()
  • set()
  • del()
  • get_all()
  • get_permissions()
  • set_permissions()
  • del_permissions_all()

Add new group

get($id : int|int[]) : array|array[]|false

Get group data

set($group : int, $title : string, $description : string) : bool

Set group data

del($group : int|int[]) : bool

Delete group

get_all() : array|bool

Get list of all groups

get_permissions($group : int) : int[]|false

Get group permissions

set_permissions($data : array, $group : int) : bool

Set group permissions

del_permissions_all($group : int) : bool

Delete all permissions of specified group

###[Up](#) Events

$Group object supports next events:

  • System/Group/Group/add
  • System/Group/Group/del/before
  • System/Group/Group/del/after

Is running after successful group addition. Parameters array:

[
    'id' => group_id
]

System/Group/Group/del/before

Is running before group deletion. Parameters array:

[
    'id' => group_id
]

System/Group/Group/del/after

Is running after group deletion. Parameters array:

[
    'id' => group_id
]