- Модуль: tasks
- Путь к файлу: ~/bitrix/modules/tasks/lib/checklist/checklistfacade.php
- Класс: BitrixTasksCheckListCheckListFacade
- Вызов: CheckListFacade::removeAttachments
static function removeAttachments($entityId, $userId, $checkList, $attachmentsIds)
{
$removeAttachmentsResult = new Result();
if (!static::checkAccess($entityId, $userId, ActionDictionary::ACTION_CHECKLIST_EDIT, $checkList))
{
$code = 'ACTION_NOT_ALLOWED';
$removeAttachmentsResult = static::addErrorToResult($removeAttachmentsResult, $code, self::ACTION_MODIFY);
return $removeAttachmentsResult;
}
$checkList->removeAttachments($attachmentsIds);
$removeAttachmentsResult = $checkList->save();
return $removeAttachmentsResult;
}