Task::unsafeDeleteRelations

  1. Bitrix24 API (v. 23.675.0)
  2. tasks
  3. Task
  4. unsafeDeleteRelations
  • Модуль: tasks
  • Путь к файлу: ~/bitrix/modules/tasks/lib/control/task.php
  • Класс: BitrixTasksControlTask
  • Вызов: Task::unsafeDeleteRelations
private function unsafeDeleteRelations()
{
	$taskData = $this->getFullTaskData();
	if (!$taskData)
	{
		return;
	}

	CTaskFiles::DeleteByTaskID($this->taskId);
	CTaskTags::DeleteByTaskID($this->taskId);
	FavoriteTable::deleteByTaskId($this->taskId, ['LOW_LEVEL' => true]);
	SortingTable::deleteByTaskId($this->taskId);
	UserOption::deleteByTaskId($this->taskId);
	TaskStageTable::clearTask($this->taskId);
	TaskCheckListFacade::deleteByEntityIdOnLowLevel($this->taskId);

	(new ResultManager($this->userId))->deleteByTaskId($this->taskId);

	ViewedTable::deleteList([
		'=TASK_ID' => $this->taskId,
	]);
	ParameterTable::deleteList([
		'=TASK_ID' => $this->taskId,
	]);
	SearchIndexTable::deleteList([
		'=TASK_ID' => $this->taskId,
	]);

	TemplateDependenceTable::deleteList([
		'=DEPENDS_ON_ID' => $this->taskId,
	]);

	Topic::delete($taskData["FORUM_TOPIC_ID"]);
	$this->ufManager->Delete(UtilUserFieldTask::getEntityCode(), $this->taskId);
}

Добавить комментарий