UserOption
Class UserOption
Table of Contents
Constants
- REMOVE_ON_USER_ROLE_CHANGED = [\Bitrix\Tasks\Internals\UserOption\Option::MUTED]
Properties
- $cache : mixed
Methods
- add() : Result
- delete() : Result
- deleteByTaskId() : void
- deleteByTaskIdAndUserId() : void
- deleteByUserId() : void
- deleteOnUserRoleChanged() : void
- Removes necessary options when changing the user's role in a task
- getAllowedOptions() : array<string|int, mixed>
- getFilterSql() : string
- getOptions() : array<string|int, mixed>
- getSelectSql() : string
- isOption() : bool
- isOptionSet() : bool
- onBeforeOptionChanged() : void
- onOptionChanged() : void
Constants
REMOVE_ON_USER_ROLE_CHANGED
public
mixed
REMOVE_ON_USER_ROLE_CHANGED
= [\Bitrix\Tasks\Internals\UserOption\Option::MUTED]
Properties
$cache
public
static mixed
$cache
= []
Methods
add()
public
static add(int $taskId, int $userId, int $option) : Result
Parameters
- $taskId : int
- $userId : int
- $option : int
Tags
Return values
Resultdelete()
public
static delete(int $taskId, int $userId, int $option) : Result
Parameters
- $taskId : int
- $userId : int
- $option : int
Tags
Return values
ResultdeleteByTaskId()
public
static deleteByTaskId(int $taskId) : void
Parameters
- $taskId : int
Tags
deleteByTaskIdAndUserId()
public
static deleteByTaskIdAndUserId(int $taskId, int $userId) : void
Parameters
- $taskId : int
- $userId : int
Tags
deleteByUserId()
public
static deleteByUserId(int $userId) : void
Parameters
- $userId : int
Tags
deleteOnUserRoleChanged()
Removes necessary options when changing the user's role in a task
public
static deleteOnUserRoleChanged(int $taskId, int $userId) : void
Parameters
- $taskId : int
- $userId : int
getAllowedOptions()
public
static getAllowedOptions() : array<string|int, mixed>
Return values
array<string|int, mixed>getFilterSql()
public
static getFilterSql(int $userId, int $option[, string $aliasPrefix = '' ]) : string
Parameters
- $userId : int
- $option : int
- $aliasPrefix : string = ''
Return values
stringgetOptions()
public
static getOptions(int $taskId, int $userId) : array<string|int, mixed>
Parameters
- $taskId : int
- $userId : int
Tags
Return values
array<string|int, mixed>getSelectSql()
public
static getSelectSql(int $userId, int $option) : string
Parameters
- $userId : int
- $option : int
Return values
stringisOption()
public
static isOption(int $option) : bool
Parameters
- $option : int
Return values
boolisOptionSet()
public
static isOptionSet(int $taskId, int $userId, int $option) : bool
Parameters
- $taskId : int
- $userId : int
- $option : int
Tags
Return values
boolonBeforeOptionChanged()
public
static onBeforeOptionChanged(int $taskId, int $userId, int $option) : void
Parameters
- $taskId : int
- $userId : int
- $option : int
onOptionChanged()
public
static onOptionChanged(int $taskId, int $userId, int $option, bool $added) : void
Parameters
- $taskId : int
- $userId : int
- $option : int
- $added : bool