method
public
static Устаревший
UserOption::add()
Сигнатура
public static add(int $taskId, int $userId, int $option) : Result
Параметры
$taskId
int
$userId
int
$option
int
Возвращаемое значение
Result
Как применяется в UserOption
UserOption::add() — метод класса \Bitrix\Tasks\Internals\UserOption модуля «Задачи».
Статический метод — вызывается через имя класса UserOption, без создания объекта.
use Bitrix\Main\Loader;
use Bitrix\Tasks\Internals\UserOption;
Loader::includeModule('tasks');
$taskId = 1;
$userId = 1;
$option = 1;
$result = UserOption::add($taskId, $userId, $option);
// $result: ResultДругие методы UserOption
delete()deleteByTaskId()deleteByTaskIdAndUserId()deleteOnUserRoleChanged()getAllowedOptions()getFilterSql()getOptions()getSelectSql()isOption()isOptionSet()onBeforeOptionChanged()onOptionChanged()
add() есть и у других классов модуля «Задачи»: AccessTable, Agent, CheckListTable, DependenceTable, ElapsedTimeTable, EventManager, EventTable, FavoriteTable.
Исходный файл: source/tasks/lib/internals/useroption.php:138

