• Модуль: tasks
  • Путь к файлу: ~/bitrix/modules/tasks/lib/replicator/template/repository/templaterepository.php
  • Класс: BitrixTasksReplicatorTemplateRepositoryTemplateRepository
  • Вызов: TemplateRepository::getTemplate
public function getTemplate(): ?TemplateObject
{
	if (!is_null($this->template))
	{
		return $this->template;
	}

	try
	{
		$query = TemplateTable::query();
		$query
			->setSelect(['*', 'UF_*', 'MEMBERS', 'TAG_LIST', 'DEPENDENCIES', 'SCENARIO', 'CHECKLIST_DATA'])
			->where('ID', $this->templateId);

		$this->template = $query->exec()->fetchObject();
	}
	catch (SystemException)
	{
		//todo: log there
		return null;
	}

	return $this->template;
}