CCrmOwnerTypeAbbr::ResolveByTypeID

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

	switch($typeID)
	{
		case CCrmOwnerType::Lead:
			return self::Lead;
		case CCrmOwnerType::SuspendedLead:
			return self::SuspendedLead;
		case CCrmOwnerType::Deal:
			return self::Deal;
		case CCrmOwnerType::SuspendedDeal:
			return self::SuspendedDeal;
		case CCrmOwnerType::Order:
			return self::Order;
		case CCrmOwnerType::OrderShipment:
			return self::OrderShipment;
		case CCrmOwnerType::OrderPayment:
			return self::OrderPayment;
		case CCrmOwnerType::Contact:
			return self::Contact;
		case CCrmOwnerType::Company:
			return self::Company;
		case CCrmOwnerType::Invoice:
			return self::Invoice;
		case CCrmOwnerType::Quote:
			return self::Quote;
		case CCrmOwnerType::Requisite:
			return self::Requisite;
		case CCrmOwnerType::DealCategory:
			return self::DealCategory;
		case CCrmOwnerType::CustomActivityType:
			return self::CustomActivityType;
		case CCrmOwnerType::SmartInvoice:
			return self::SmartInvoice;
		case CCrmOwnerType::SuspendedSmartInvoice:
			return self::SuspendedSmartInvoice;
		case CCrmOwnerType::SmartDocument:
			return self::SmartDocument;
		case CCrmOwnerType::SuspendedSmartDocument:
			return self::SuspendedSmartDocument;
		case CCrmOwnerType::System:
			return self::System;
		default:
			if (CCrmOwnerType::isPossibleDynamicTypeId($typeID))
			{
				return self::getDynamicTypeAbbreviation($typeID);
			}
			if (CCrmOwnerType::isPossibleSuspendedDynamicTypeId($typeID))
			{
				return self::getSuspendedTypeAbbreviation($typeID);
			}
	}

	return self::Undefined;
}

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