CCrmRequisitePresetRestProxy::innerGetList

  1. Bitrix24 API (v. 23.675.0)
  2. crm
  3. CCrmRequisitePresetRestProxy
  4. innerGetList
  • Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/classes/general/restservice.php
  • Класс: \CCrmRequisitePresetRestProxy
  • Вызов: CCrmRequisitePresetRestProxy::innerGetList
protected function innerGetList($order, $filter, $select, $navigation, &$errors)
{
	if(!EntityPreset::checkReadPermissionOwnerEntity())
	{
		$errors[] = 'Access denied.';
		return false;
	}

	$entity = self::getEntity();

	$filter['=ENTITY_TYPE_ID'] = EntityPreset::Requisite;

	$page = isset($navigation['iNumPage']) ? (int)$navigation['iNumPage'] : 1;
	$limit = isset($navigation['nPageSize']) ? (int)$navigation['nPageSize'] : CCrmRestService::LIST_LIMIT;
	$offset = $limit * $page;

	if(!is_array($select))
		$select = array();

	if(empty($select))
		$select = array_keys($this->getFieldsInfo());

	$result = $entity->getList(
		array(
			'order' => $order,
			'filter' => $filter,
			'select' => $select,
			'offset' => $offset,
			'count_total' => true
		)
	);

	if (is_object($result))
	{
		$dbResult = new CDBResult($result);
	}
	else
	{
		$dbResult = new CDBResult();
		$dbResult->InitFromArray(array());
	}
	$dbResult->NavStart($limit, false, $page);

	return $dbResult;
}

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