...Человеческий поиск в разработке...
- Модуль: crm
- Путь к файлу: ~/bitrix/modules/crm/classes/general/restservice.php
- Класс: \CCrmRestProxyBase
- Вызов: CCrmRestProxyBase::prepareListFromDbResult
protected function prepareListFromDbResult(CDBResult $dbResult, array $options) { $result = array(); $fieldsInfo = $this->getFieldsInfo(); $selectedFmTypeIDs = $options['SELECTED_FM_TYPES'] ?? array(); if(empty($selectedFmTypeIDs)) { while($fields = $dbResult->Fetch()) { $this->prepareListItemFields($fields); $this->externalizeFields($fields, $fieldsInfo); $result[] = $fields; } } else { $entityMap = array(); while($fields = $dbResult->Fetch()) { $this->prepareListItemFields($fields); $entityID = intval($this->getIdentity($fields)); if($entityID <= 0) { throw new RestException('Could not find entity ID.'); } $entityMap[$entityID] = $fields; } $this->prepareListItemMultiFields($entityMap, $this->getOwnerTypeID(), $selectedFmTypeIDs); foreach($entityMap as &$fields) { $this->externalizeFields($fields, $fieldsInfo); $result[] = $fields; } unset($fields); } return CCrmRestService::setNavData($result, $dbResult); }