CCrmOwnerType::IsSliderEnabled

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

	if ($typeID === CCrmOwnerType::Order
		|| $typeID === CCrmOwnerType::OrderCheck
		|| $typeID === CCrmOwnerType::OrderShipment
		|| $typeID === CCrmOwnerType::OrderPayment
		|| $typeID === CCrmOwnerType::StoreDocument
		|| $typeID === CCrmOwnerType::SmartInvoice
		|| $typeID === CCrmOwnerType::SmartDocument
		|| $typeID === CCrmOwnerType::AgentContractDocument
	)
	{
		return true;
	}

	if (!\Bitrix\Crm\Settings\LayoutSettings::getCurrent()->isSliderEnabled())
	{
		return false;
	}

	if ($typeID === static::Quote)
	{
		return \Bitrix\Crm\Settings\QuoteSettings::getCurrent()->isFactoryEnabled();
	}

	return $typeID === CCrmOwnerType::Lead
		|| $typeID === CCrmOwnerType::Deal
		|| $typeID === CCrmOwnerType::Quote
		|| $typeID === CCrmOwnerType::Contact
		|| $typeID === CCrmOwnerType::Company
		|| static::isPossibleDynamicTypeId($typeID);
}

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