CCrmLiveFeedEntity::GetByEntityTypeID

  1. Bitrix24 API (v. 23.675.0)
  2. crm
  3. CCrmLiveFeedEntity
  4. GetByEntityTypeID
  • Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/classes/general/livefeed.php
  • Класс: \CCrmLiveFeedEntity
  • Вызов: CCrmLiveFeedEntity::GetByEntityTypeID
static function GetByEntityTypeID($entityTypeID)
{
	switch($entityTypeID)
	{
		case CCrmOwnerType::Lead:
		{
			return self::Lead;
		}
		case CCrmOwnerType::Contact:
		{
			return self::Contact;
		}
		case CCrmOwnerType::Company:
		{
			return self::Company;
		}
		case CCrmOwnerType::Deal:
		{
			return self::Deal;
		}
		case CCrmOwnerType::Activity:
		{
			return self::Activity;
		}
		case CCrmOwnerType::Invoice:
		{
			return self::Invoice;
		}
		case CCrmOwnerType::Order:
		{
			return self::Order;
		}
		case CCrmOwnerType::SuspendedLead:
		{
			return self::SuspendedLead;
		}
		case CCrmOwnerType::SuspendedContact:
		{
			return self::SuspendedContact;
		}
		case CCrmOwnerType::SuspendedCompany:
		{
			return self::SuspendedCompany;
		}
		case CCrmOwnerType::SuspendedDeal:
		{
			return self::SuspendedDeal;
		}
		case CCrmOwnerType::SuspendedActivity:
		{
			return self::SuspendedActivity;
		}
		default:
		{
			if (
				$entityTypeID >= CCrmOwnerType::DynamicTypeStart
				&& $entityTypeID < CCrmOwnerType::DynamicTypeEnd
			)
			{
				return str_replace('#ID#', $entityTypeID, self::DynamicPattern);
			}

			if (
				$entityTypeID >= CCrmOwnerType::SuspendedDynamicTypeStart
				&& $entityTypeID < CCrmOwnerType::SuspendedDynamicTypeEnd
			)
			{
				return str_replace('#ID#', $entityTypeID, self::SuspendedDynamicPattern);
			}

			return self::Undefined;
		}
	}
}

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