CCrmOwnerType::ResolveSuspended

  1. Bitrix24 API (v. 23.675.0)
  2. crm
  3. CCrmOwnerType
  4. ResolveSuspended
  • Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/classes/general/crm_owner_type.php
  • Класс: \CCrmOwnerType
  • Вызов: CCrmOwnerType::ResolveSuspended
static function ResolveSuspended($typeID): int
{
	$typeID = (int)$typeID;

	if($typeID <= 0)
	{
		return self::Undefined;
	}

	switch($typeID)
	{
		case self::Lead:
		case self::SuspendedLead:
			return self::SuspendedLead;

		case self::Deal:
		case self::SuspendedDeal:
			return self::SuspendedDeal;

		case self::Contact:
		case self::SuspendedContact:
			return self::SuspendedContact;

		case self::Company:
		case self::SuspendedCompany:
			return self::SuspendedCompany;

		case self::Invoice:
		case self::SuspendedInvoice:
			return self::SuspendedInvoice;

		case self::Activity:
		case self::SuspendedActivity:
			return self::SuspendedActivity;

		case self::Quote:
		case self::SuspendedQuote:
			return self::SuspendedQuote;

		case self::Order:
		case self::SuspendedOrder:
			return self::SuspendedOrder;

		case self::Requisite:
		case self::SuspendedRequisite:
			return self::SuspendedRequisite;

		case self::SmartInvoice:
		case self::SuspendedSmartInvoice:
			return self::SuspendedSmartInvoice;

		case self::SmartDocument:
		case self::SuspendedSmartDocument:
			return self::SuspendedSmartDocument;

		default:
			$isPossibleDynamicTypeId = static::isPossibleDynamicTypeId($typeID);
			$isPossibleSuspendedDynamicTypeId = static::isPossibleSuspendedDynamicTypeId($typeID);
			if(
				(
					$isPossibleDynamicTypeId
					|| $isPossibleSuspendedDynamicTypeId
				)
				&& static::IsDefined($typeID)
			)
			{
				return static::getSuspendedDynamicTypeId($typeID);
			}

			return self::Undefined;
	}
}

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