...Человеческий поиск в разработке...
- Модуль: tasks
- Путь к файлу: ~/bitrix/modules/tasks/lib/internals/useroption.php
- Класс: BitrixTasksInternalsUserOption
- Вызов: UserOption::delete
static function delete(int $taskId, int $userId, int $option): Result { static::onBeforeOptionChanged($taskId, $userId, $option); $deleteResult = new Result(); if ($taskId <= 0 || $userId <= 0 || !static::isOption($option)) { $deleteResult->addError(0, 'Some parameter is wrong.'); return $deleteResult; } $item = UserOptionTable::getList([ 'select' => ['ID'], 'filter' => [ 'TASK_ID' => $taskId, 'USER_ID' => $userId, 'OPTION_CODE' => $option, ], ])->fetch(); if ($item) { $tableDeleteResult = UserOptionTable::delete($item); if (!$tableDeleteResult->isSuccess()) { $deleteResult->addError(1, 'Deleting from table failed.'); return $deleteResult; } static::onOptionChanged($taskId, $userId, $option, false); } return $deleteResult; }