CCrmOwnerType::IsEntity

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

	$isStatic = (
		$typeID === self::Lead
		|| $typeID === self::Deal
		|| $typeID === self::Contact
		|| $typeID === self::Company
		|| $typeID === self::Invoice
		|| $typeID === self::Quote
		|| $typeID === self::Activity
		|| $typeID === self::Order
		|| $typeID === self::OrderPayment
		|| $typeID === self::OrderShipment
		|| $typeID === self::OrderCheck
		|| $typeID === self::CheckCorrection
		|| $typeID === self::DeliveryRequest
		|| $typeID === self::ShipmentDocument
	);

	if($isStatic)
	{
		return true;
	}

	if(static::isUseDynamicTypeBasedApproach($typeID))
	{
		return static::IsDefined($typeID);
	}

	return false;
}

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