• Модуль: tasks
  • Путь к файлу: ~/bitrix/modules/tasks/lib/replicator/template/templateparameter.php
  • Класс: BitrixTasksReplicatorTemplateTemplateParameter
  • Вызов: TemplateParameter::getData
public function getData(): array
{
	$template = $this->repository->getTemplate();
	if (is_null($template))
	{
		return [];
	}
	$templateFields = $template->collectValues();
	$taskFields = array_intersect_key($templateFields, $this->getCommonFields());

	$taskFields['FORKED_BY_TEMPLATE_ID'] = $template->getId();
	$taskFields['STATUS_CHANGED_BY'] = $template->getCreatedBy();
	$taskFields['STATUS_CHANGED_DATE'] = new DateTime();

	if((int)$templateFields['RESPONSIBLE_ID'] <= 0 && count($templateFields['RESPONSIBLES'])) // for broken templates
	{
		$taskFields['RESPONSIBLE_ID'] = $taskFields['RESPONSIBLES'][0];
	}

	if ($template->getMultitask())
	{
		$taskFields['RESPONSIBLE_ID'] = $template->getCreatedBy();
	}

	return $this->getConvertedData($templateFields, $taskFields);
}