/** * @deprecated */ public static function getListFast($parameters = array()) { // here $parameters conversion required if (isset($parameters['filter']['NAME'])) { $parameters['filter']['PHRASE'] = $parameters['filter']['NAME']; unset($parameters['filter']['NAME']); } if (isset($parameters['filter']['LANGUAGE_ID'])) { $parameters['filter']['NAME.LANGUAGE_ID'] = $parameters['filter']['LANGUAGE_ID']; unset($parameters['filter']['LANGUAGE_ID']); } return \Bitrix\Sale\Location\Search\Finder::find($parameters, array('USE_INDEX' => false, 'USE_ORM' => false)); }
public static function processSearchRequestV2($parameters) { static::checkRequiredModules(); $parameters = static::processSearchRequestV2CheckQuery($parameters); // map page & page_size => limit & offset if ($pageSize = intval($parameters['PAGE_SIZE'])) { $page = intval($parameters['PAGE']); $parameters['limit'] = $pageSize; $parameters['offset'] = $page ? $page * $pageSize : 0; } unset($parameters['PAGE_SIZE']); unset($parameters['PAGE']); // do request $data = array('ITEMS' => array(), 'ETC' => array()); $result = Location\Search\Finder::find(static::processSearchRequestV2ModifyParameters($parameters), static::processSearchRequestV2GetFinderBehaviour()); while ($item = $result->fetch()) { // hack to repair ORM if (!isset($item['ID'])) { $item['ID'] = $item['VALUE']; } $data['ITEMS'][] = $item; } static::processSearchRequestV2GetAdditional($data, $parameters); static::processSearchRequestV2AfterSearchFormatResult($data, $parameters); return $data; }