Chat::isEntitySupported

  1. Bitrix24 API (v. 23.675.0)
  2. crm
  3. Chat
  4. isEntitySupported
  • Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/integration/im/chat.php
  • Класс: Bitrix\Crm\Integration\Im\Chat
  • Вызов: Chat::isEntitySupported
static function isEntitySupported(int $entityTypeId): bool
{
	$staticEntities = [\CCrmOwnerType::Deal, \CCrmOwnerType::Lead];
	if (in_array($entityTypeId, $staticEntities, true))
	{
		return true;
	}

	$factory = Crm\Service\Container::getInstance()->getFactory($entityTypeId);
	if ($factory)
	{
		return $factory->isObserversEnabled();
	}

	return false;
}

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