• Модуль: bizproc
  • Путь к файлу: ~/bitrix/modules/bizproc/lib/integration/ui/entityselector/templateprovider.php
  • Класс: BitrixBizprocIntegrationUIEntitySelectorTemplateProvider
  • Вызов: TemplateProvider::openPreselectedItemTree
protected function openPreselectedItemTree(Dialog $dialog): void
{
	$currentUserId = $this->getCurrentUserId();

	$preselectedItems = $dialog->getPreselectedCollection()->getEntityItems(static::ENTITY_ID);
	$ids = array_keys($preselectedItems);
	$templates = $this->getTemplatesByIds(array_filter(array_map('intval', $ids)));

	foreach ($templates as $template)
	{
		if (
			IsModuleInstalled($template->getModuleId())
			&& $this->canUserStartWorkflow($currentUserId, $template->getDocumentComplexType())
		)
		{
			$this->openTemplateTree($dialog, $template);
		}
	}
}