• Модуль: crmmobile
  • Путь к файлу: ~/bitrix/modules/crmmobile/lib/Kanban/Entity.php
  • Класс: BitrixCrmMobileKanbanEntity
  • Вызов: Entity::getDynamicEntityInstance
static function getDynamicEntityInstance(int $entityTypeId): Entity
{
	$factory = Container::getInstance()->getFactory($entityTypeId);

	if ($factory)
	{
		if ($factory->isStagesEnabled())
		{
			return self::getKanbanInstance($entityTypeId);
		}

		return self::getListInstance($entityTypeId);
	}

	$entityTypeName = CCrmOwnerType::ResolveName($entityTypeId);

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