PHP Class NerdsAndCompany\Schematic\Services\UserGroups

Sync Craft Setups.
Author: Nerds & Company
Inheritance: extends Base
Mostrar archivo Open project: itmundi/schematic Class Usage Examples

Public Methods

Method Description
export ( array $groups = [] ) : array Export user groups.
import ( array $groupDefinitions, boolean $force = false ) : Result Import usergroups.

Private Methods

Method Description
getAllMappedPermissions ( ) : array Get a mapping of all permissions from lowercase to camelcase savePermissions only accepts camelcase.
getAssetSourcesService ( ) : AssetSourcesService
getGlobalsService ( ) : GlobalsService
getGroupDefinition ( Craft\UserGroupModel $group ) : array Get group definition.
getGroupPermissionDefinitions ( $group ) : array | string Get group permissions.
getMappedPermissions ( array $permissions ) : array
getPermission ( string $permissionDefinition ) : string Get permission.
getPermissionDefinition ( string $permission ) : string Get permission definition.
getPermissions ( array $permissionDefinitions ) : array Get permissions.
getSectionsService ( ) : SectionsService
getUserGroupsService ( ) : UserGroupsService
getUserPermissionsService ( ) : UserPermissionsService
mapPermissionSource ( array $mapping, string $permission, boolean $export ) : string

Method Details

export() public method

Export user groups.
public export ( array $groups = [] ) : array
$groups array
return array

import() public method

Import usergroups.
public import ( array $groupDefinitions, boolean $force = false ) : Result
$groupDefinitions array
$force boolean if set to true items not in the import will be deleted
return Result