- Модуль: crm
- Путь к файлу: ~/bitrix/modules/crm/classes/general/restservice.php
- Класс: \CCrmRequisiteLinkRestProxy
- Вызов: CCrmRequisiteLinkRestProxy::innerGetList
protected function innerGetList($order, $filter, $select, $navigation, &$errors)
{
$entityTypeId = 0;
$entityId = 0;
if (is_array($filter))
{
if (isset($filter['=ENTITY_TYPE_ID']))
{
$entityTypeId = (int)$filter['=ENTITY_TYPE_ID'];
}
else if (isset($filter['ENTITY_TYPE_ID']))
{
$entityTypeId = (int)$filter['ENTITY_TYPE_ID'];
}
if (isset($filter['=ENTITY_ID']))
{
$entityId = (int)$filter['=ENTITY_ID'];
}
else if (isset($filter['ENTITY_ID']))
{
$entityId = (int)$filter['ENTITY_ID'];
}
}
if (!Requisite\EntityLink::checkReadPermissionOwnerEntity($entityTypeId, $entityId))
{
$errors[] = 'Access denied.';
return false;
}
unset($entityTypeId, $entityId);
$page = isset($navigation['iNumPage']) ? (int)$navigation['iNumPage'] : 1;
$limit = isset($navigation['nPageSize']) ? (int)$navigation['nPageSize'] : CCrmRestService::LIST_LIMIT;
$offset = $limit * $page;
if(empty($select))
$select = array_keys($this->getFieldsInfo());
$result = Requisite\EntityLink::getList(
array(
'order' => $order,
'filter' => $filter,
'select' => $select,
'offset' => $offset,
'count_total' => true
)
);
$dbResult = new CDBResult($result);
$dbResult->NavStart($limit, false, $page);
return $dbResult;
}