CAllCrmDeal::IsStageExists

  1. Bitrix24 API (v. 23.675.0)
  2. crm
  3. CAllCrmDeal
  4. IsStageExists
  • Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/classes/general/crm_deal.php
  • Класс: \CAllCrmDeal
  • Вызов: CAllCrmDeal::IsStageExists
static function IsStageExists($stageID, $categoryID = -1, array $params = [])
{
	$stageID = (string)$stageID;
	$categoryID = (int)$categoryID;

	if($categoryID < 0)
	{
		$categoryID = DealCategory::resolveFromStageID($stageID);
	}

	if (isset($params['viewMode']) && $params['viewMode'] === ViewMode::MODE_ACTIVITIES)
	{
		$entityActivities = new Crm\Kanban\Entity\EntityActivities(\CCrmOwnerType::Deal, $categoryID);
		$stageList = array_flip(
			array_column($entityActivities->getStagesList($categoryID), 'STATUS_ID')
		);
	}
	else
	{
		$stageList = self::GetStages($categoryID);
	}

	return isset($stageList[$stageID]);
}

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