Helper
Table of Contents
Methods
- canCurrentUserCallFromCrm() : bool
- canCurrentUserPerformAnyCall() : bool
- canCurrentUserPerformCalls() : bool
- canUpdateBalance() : bool
- canUse() : bool
- canUserCallNumber() : bool
- clearMenuCache() : void
- createDefaultRoles() : bool
- Creates default roles and associates them whith access tokens.
- getAllowedUserIds() : array<string|int, mixed>|null
- getCurrentUserId() : int
- getDefaultRoleAccess() : array<string|int, mixed>
- getDefaultRoles() : array<string|int, mixed>
- getUserColleagues() : array<string|int, mixed>
- isAdmin() : bool
- Returns true if user is portal admin.
- isBalanceMenuEnabled() : bool
- isLinesMenuEnabled() : bool
- isMainMenuEnabled() : bool
- isSettingsMenuEnabled() : bool
- isUsersMenuEnabled() : bool
- resetToDefault() : null
- Deletes oll roles and permissions and creates default ones instead.
Methods
canCurrentUserCallFromCrm()
public
static canCurrentUserCallFromCrm() : bool
Return values
boolcanCurrentUserPerformAnyCall()
public
static canCurrentUserPerformAnyCall() : bool
Return values
boolcanCurrentUserPerformCalls()
public
static canCurrentUserPerformCalls() : bool
Return values
boolcanUpdateBalance()
public
static canUpdateBalance() : bool
Return values
boolcanUse()
public
static canUse() : bool
Return values
boolcanUserCallNumber()
public
static canUserCallNumber(mixed $userId, mixed $number[, mixed $country = '' ]) : bool
Parameters
- $userId : mixed
- $number : mixed
- $country : mixed = ''
Return values
boolclearMenuCache()
public
static clearMenuCache() : void
createDefaultRoles()
Creates default roles and associates them whith access tokens.
public
static createDefaultRoles() : bool
Tags
Return values
boolgetAllowedUserIds()
public
static getAllowedUserIds(int $userId, string $permission) : array<string|int, mixed>|null
Parameters
- $userId : int
- $permission : string
Return values
array<string|int, mixed>|null —Returns array of owner user ids if there is limit and null if query should not be limited.
getCurrentUserId()
public
static getCurrentUserId() : int
Return values
intgetDefaultRoleAccess()
public
static getDefaultRoleAccess() : array<string|int, mixed>
Return values
array<string|int, mixed>getDefaultRoles()
public
static getDefaultRoles() : array<string|int, mixed>
Return values
array<string|int, mixed>getUserColleagues()
public
static getUserColleagues(mixed $userId) : array<string|int, mixed>
Parameters
- $userId : mixed
Return values
array<string|int, mixed>isAdmin()
Returns true if user is portal admin.
public
static isAdmin([int $userId = null ]) : bool
Parameters
- $userId : int = null
-
Id of the user.
Return values
boolisBalanceMenuEnabled()
public
static isBalanceMenuEnabled() : bool
Return values
boolisLinesMenuEnabled()
public
static isLinesMenuEnabled() : bool
Return values
boolisMainMenuEnabled()
public
static isMainMenuEnabled() : bool
Return values
boolisSettingsMenuEnabled()
public
static isSettingsMenuEnabled() : bool
Return values
boolisUsersMenuEnabled()
public
static isUsersMenuEnabled() : bool
Return values
boolresetToDefault()
Deletes oll roles and permissions and creates default ones instead.
public
static resetToDefault() : null