• Модуль: crmmobile
  • Путь к файлу: ~/bitrix/modules/crmmobile/lib/Kanban/Entity.php
  • Класс: BitrixCrmMobileKanbanEntity
  • Вызов: Entity::getInstance
static function getInstance(string $entityTypeName): Entity
{
	$entityTypeId = CCrmOwnerType::ResolveID($entityTypeName);
	if (in_array($entityTypeName, self::USE_ONLY_LIST_STRATEGY, true))
	{
		return self::getListInstance($entityTypeId);
	}

	if (
		in_array($entityTypeName, self::USE_ONLY_KANBAN_STRATEGY, true)
		|| CCrmOwnerType::isDynamicTypeBasedStaticEntity($entityTypeId)
	)
	{
		return self::getKanbanInstance($entityTypeId);
	}

	if (CCrmOwnerType::isPossibleDynamicTypeId($entityTypeId))
	{
		return self::getDynamicEntityInstance($entityTypeId);
	}

	throw new EntityNotFoundException('EntityType: ' . $entityTypeName . ' unknown');
}