Task::copyParams

  1. Bitrix24 API (v. 23.675.0)
  2. tasks
  3. Task
  4. copyParams
  • Модуль: tasks
  • Путь к файлу: ~/bitrix/modules/tasks/lib/copy/implement/task.php
  • Класс: BitrixTasksCopyImplementTask
  • Вызов: Task::copyParams
private function copyParams(Container $parentContainer, int $taskId, int $copiedTaskId): Result
{
	if (!$this->paramsCopier)
	{
		return new Result();
	}

	$dictionary = new Dictionary();
	$dictionary->set('TASK_ID', $copiedTaskId);

	$containerCollection = new ContainerCollection();

	$queryObject = ParameterTable::getList([
		'select' => ['ID'],
		'filter' => ['TASK_ID' => $taskId],
	]);
	while ($paramsData = $queryObject->fetch())
	{
		$container = new Container($paramsData['ID']);

		$container->setDictionary($dictionary);

		$containerCollection[] = $container;
	}

	if (!$containerCollection->isEmpty())
	{
		return $this->paramsCopier->copy($containerCollection);
	}

	return new Result();
}

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