PHP Class Backend\Modules\Groups\Engine\Model

Afficher le fichier Open project: forkcms/forkcms Class Usage Examples

Méthodes publiques

Méthode Description
addActionPermissions ( array $actionPermissions ) Add action permissions
addModulePermissions ( array $modulePermissions ) Add module permissions
alreadyExists ( string $name ) : boolean Check if a group already exists
delete ( integer $id ) Delete a group
deleteActionPermissions ( array $actionPermissions ) Delete action permissions
deleteModulePermissions ( array $modulePermissions ) Delete module permissions
deleteMultipleGroups ( integer $userId ) Delete a user's multiple groups
exists ( integer $id ) : boolean Check if a group already exists
existsActionPermission ( array $permission ) : boolean Check if a action permission exists
existsModulePermission ( array $permission ) : boolean Check if a module permission exists
get ( integer $id ) : array Get a group
getActionPermissions ( integer $id ) : array Get group action permissions
getAll ( ) : array Get all groups
getGroupsByUser ( integer $id ) : array Get all groups of one user
getModulePermissions ( integer $id ) : array Get group module permissions
getSetting ( integer $groupId, string $name ) : array Get a group setting
getUsers ( integer $groupId ) : array Get all users in a group
insert ( array $group, array $setting ) Insert a group and a setting
insertMultipleGroups ( integer $userId, array $groups ) Insert a user's multiple groups
insertSetting ( array $setting ) : integer Insert a group setting
isUserInGroup ( integer $userId, integer $groupId ) : boolean Check if a certain user is in a certain group
update ( array $group, array $setting ) Update a group
updateSetting ( array $setting ) Update a group setting

Method Details

addActionPermissions() public static méthode

Add action permissions
public static addActionPermissions ( array $actionPermissions )
$actionPermissions array

addModulePermissions() public static méthode

Add module permissions
public static addModulePermissions ( array $modulePermissions )
$modulePermissions array

alreadyExists() public static méthode

Check if a group already exists
public static alreadyExists ( string $name ) : boolean
$name string
Résultat boolean

delete() public static méthode

Delete a group
public static delete ( integer $id )
$id integer The id of the group to delete.

deleteActionPermissions() public static méthode

Delete action permissions
public static deleteActionPermissions ( array $actionPermissions )
$actionPermissions array The action permissions to delete.

deleteModulePermissions() public static méthode

Delete module permissions
public static deleteModulePermissions ( array $modulePermissions )
$modulePermissions array The module permissions to delete.

deleteMultipleGroups() public static méthode

Delete a user's multiple groups
public static deleteMultipleGroups ( integer $userId )
$userId integer The id of the user.

exists() public static méthode

Check if a group already exists
public static exists ( integer $id ) : boolean
$id integer The id to check upon.
Résultat boolean

existsActionPermission() public static méthode

Check if a action permission exists
public static existsActionPermission ( array $permission ) : boolean
$permission array The permission to check upon.
Résultat boolean

existsModulePermission() public static méthode

Check if a module permission exists
public static existsModulePermission ( array $permission ) : boolean
$permission array The permission to check upon.
Résultat boolean

get() public static méthode

Get a group
public static get ( integer $id ) : array
$id integer The id of the group to fetch.
Résultat array

getActionPermissions() public static méthode

Get group action permissions
public static getActionPermissions ( integer $id ) : array
$id integer The id of the group.
Résultat array

getAll() public static méthode

Get all groups
public static getAll ( ) : array
Résultat array

getGroupsByUser() public static méthode

Get all groups of one user
public static getGroupsByUser ( integer $id ) : array
$id integer
Résultat array

getModulePermissions() public static méthode

Get group module permissions
public static getModulePermissions ( integer $id ) : array
$id integer The id of the group.
Résultat array

getSetting() public static méthode

Get a group setting
public static getSetting ( integer $groupId, string $name ) : array
$groupId integer The id of the group of the setting.
$name string The name of the setting to fetch.
Résultat array

getUsers() public static méthode

Get all users in a group
public static getUsers ( integer $groupId ) : array
$groupId integer The id of the group.
Résultat array

insert() public static méthode

Insert a group and a setting
public static insert ( array $group, array $setting )
$group array The group to insert.
$setting array The setting to insert.

insertMultipleGroups() public static méthode

Insert a user's multiple groups
public static insertMultipleGroups ( integer $userId, array $groups )
$userId integer The id of the user.
$groups array The groups.

insertSetting() public static méthode

Insert a group setting
public static insertSetting ( array $setting ) : integer
$setting array
Résultat integer

isUserInGroup() public static méthode

Check if a certain user is in a certain group
public static isUserInGroup ( integer $userId, integer $groupId ) : boolean
$userId integer The user id
$groupId integer The group id
Résultat boolean

update() public static méthode

Update a group
public static update ( array $group, array $setting )
$group array The group to update.
$setting array The setting to update.

updateSetting() public static méthode

Update a group setting
public static updateSetting ( array $setting )
$setting array The setting to update.