• Модуль: tasks
  • Путь к файлу: ~/bitrix/modules/tasks/lib/integration/bizproc/automation/engine/templatesscheme.php
  • Класс: BitrixTasksIntegrationBizprocAutomationEngineTemplatesScheme
  • Вызов: TemplatesScheme::addPlanTasksTemplates
private function addPlanTasksTemplates(): void
{
	$documentType = $this->createComplexDocumentType(Task::resolvePlanTaskType($this->userId));

	StagesTable::setWorkMode(StagesTable::WORK_MODE_USER);
	foreach (StagesTable::getStages($this->userId) as $statusId => $stage)
	{
		$scope = new TemplateScope($documentType, null, $statusId);
		$scope->setNames(null, $stage['TITLE'] ?? '');
		$scope->setProjectName(Loc::getMessage('TASKS_BP_AUTOMATION_ENGINE_TEMPLATES_SCHEME_PLAN_TASKS'));

		$this->addTemplate($scope);
	}
}