CCrmBizProcHelper::HasAutoWorkflows

  1. Bitrix24 API (v. 23.675.0)
  2. crm
  3. CCrmBizProcHelper
  4. HasAutoWorkflows
  • Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/classes/general/crm_bizproc_helper.php
  • Класс: \CCrmBizProcHelper
  • Вызов: CCrmBizProcHelper::HasAutoWorkflows
static function HasAutoWorkflows($ownerTypeID, $eventType)
{
	if (!(IsModuleInstalled('bizproc') && CModule::IncludeModule('bizproc') && CBPRuntime::isFeatureEnabled()))
	{
		return false;
	}

	$ownerTypeID = (int)$ownerTypeID;
	$eventType = (int)$eventType;

	$docName = self::ResolveDocumentName($ownerTypeID);
	if($docName === '')
	{
		return false;
	}

	$ownerTypeName = CCrmOwnerType::ResolveName($ownerTypeID);
	if($ownerTypeName === '')
	{
		return false;
	}

	$ary = \CBPWorkflowTemplateLoader::SearchTemplatesByDocumentType(array('crm', $docName, $ownerTypeName), $eventType);
	return !empty($ary);
}

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