CCrmDealRestProxy::getProductRows

  1. Bitrix24 API (v. 23.675.0)
  2. crm
  3. CCrmDealRestProxy
  4. getProductRows
  • Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/classes/general/restservice.php
  • Класс: \CCrmDealRestProxy
  • Вызов: CCrmDealRestProxy::getProductRows
public function getProductRows($ID)
{
	$ID = (int)$ID;
	if($ID <= 0)
	{
		throw new RestException('The parameter id is invalid or not defined.');
	}

	$userPermissions = CCrmPerms::GetCurrentUserPermissions();
	$categoryID = CCrmDeal::GetCategoryID($ID);
	if($categoryID < 0)
	{
		throw new RestException(
			!CCrmDeal::CheckReadPermission(0, $userPermissions) ? 'Access denied' : 'Not found'
		);
	}
	elseif(!CCrmDeal::CheckReadPermission($ID, $userPermissions, $categoryID))
	{
		throw new RestException('Access denied.');
	}

	return CCrmDeal::LoadProductRows($ID);
}

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