UserAbsence
Table of Contents
Constants
- CACHE_PATH = '/bx/intranet/absence/'
- CACHE_TTL = 2678400
Properties
- $defaultVacationTypes : mixed
Methods
- cleanCache() : void
- getActiveVacationTypes() : mixed
- getCurrentMonth() : array<string|int, mixed>
- getIblockId() : int
- getTypeCaption() : string
- getVacationTypes() : array<string|int, mixed>
- isAbsent() : bool|mixed
- isAbsentOnVacation() : bool|mixed
- isVacation() : bool
- Checks whether the absence type is vacation-related.
- onAfterIblockElementModify() : bool
- onUserOnlineStatusGetCustomOfflineStatus() : array<string|int, mixed>|bool
- saveActiveVacationTypes() : bool
Constants
CACHE_PATH
public
mixed
CACHE_PATH
= '/bx/intranet/absence/'
CACHE_TTL
public
mixed
CACHE_TTL
= 2678400
Properties
$defaultVacationTypes
public
static mixed
$defaultVacationTypes
= ['VACATION', 'LEAVESICK', 'LEAVEMATERINITY', 'LEAVEUNPAYED']
Methods
cleanCache()
public
static cleanCache() : void
getActiveVacationTypes()
public
static getActiveVacationTypes() : mixed
getCurrentMonth()
public
static getCurrentMonth() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed>getIblockId()
public
static getIblockId() : int
Tags
Return values
intgetTypeCaption()
public
static getTypeCaption(mixed $xmlId[, string $default = '' ]) : string
Parameters
- $xmlId : mixed
- $default : string = ''
Return values
stringgetVacationTypes()
public
static getVacationTypes() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed>isAbsent()
public
static isAbsent(mixed $userId[, bool $returnToDate = false ]) : bool|mixed
Parameters
- $userId : mixed
- $returnToDate : bool = false
Tags
Return values
bool|mixedisAbsentOnVacation()
public
static isAbsentOnVacation(mixed $userId[, bool $returnToDate = false ]) : bool|mixed
Parameters
- $userId : mixed
- $returnToDate : bool = false
Tags
Return values
bool|mixedisVacation()
Checks whether the absence type is vacation-related.
public
static isVacation(mixed $type) : bool
Parameters
- $type : mixed
Return values
boolonAfterIblockElementModify()
public
static onAfterIblockElementModify(mixed $fields) : bool
Parameters
- $fields : mixed
Tags
Return values
boolonUserOnlineStatusGetCustomOfflineStatus()
public
static onUserOnlineStatusGetCustomOfflineStatus(mixed $userId) : array<string|int, mixed>|bool
Parameters
- $userId : mixed
Tags
Return values
array<string|int, mixed>|boolsaveActiveVacationTypes()
public
static saveActiveVacationTypes([array<string|int, mixed> $types = [] ]) : bool
Parameters
- $types : array<string|int, mixed> = []