CAllCrmCompany::GetTopIDs

  1. Bitrix24 API (v. 23.675.0)
  2. crm
  3. CAllCrmCompany
  4. GetTopIDs
  • Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/classes/general/crm_company.php
  • Класс: \CAllCrmCompany
  • Вызов: CAllCrmCompany::GetTopIDs
static function GetTopIDs($top, $sortType = 'ASC', $userPermissions = null)
{
	$top = (int)$top;
	if ($top <= 0)
	{
		return [];
	}

	$sortType = mb_strtoupper($sortType) !== 'DESC' ? 'ASC' : 'DESC';

	return \Bitrix\Crm\Entity\Company::getInstance()->getTopIDs([
		'order' => ['ID' => $sortType],
		'limit' => $top,
		'userPermissions' => $userPermissions
	]);
}

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