private function _searchCurrency($cndBase) { $result = []; $cnd = array_merge($cndBase, [$this->createLookup()]); $money = new CurrencyList($cnd); if ($data = $money->getListviewData()) { if ($this->searchMask & SEARCH_TYPE_OPEN) { foreach ($money->iterate() as $__) { $data[$money->id]['param1'] = strToLower($money->getField('iconString')); } } $result = array('type' => TYPE_CURRENCY, 'appendix' => ' (Currency)', 'matches' => $money->getMatches(), 'file' => CurrencyList::$brickFile, 'data' => $data, 'params' => []); if ($money->getMatches() > $this->maxResults) { $result['params']['note'] = sprintf(Util::$tryNarrowingString, 'LANG.lvnote_currenciesfound', $money->getMatches(), $this->maxResults); $result['params']['_truncated'] = 1; } } return $result; }
private function _searchCurrency($cndBase) { $cnd = array_merge($cndBase, [$this->createLookup()]); $money = new CurrencyList($cnd); if ($data = $money->getListviewData()) { $result['data'] = array_values($data); $osInfo = [TYPE_CURRENCY, ' (Currency)', $money->getMatches()]; if ($this->searchMask & SEARCH_TYPE_OPEN) { foreach ($money->iterate() as $id => $__) { $osInfo[3][$id] = strToLower($money->getField('iconString')); } } if ($money->getMatches() > $this->maxResults) { $result['note'] = sprintf(Util::$tryNarrowingString, 'LANG.lvnote_currenciesfound', $money->getMatches(), $this->maxResults); $result['_truncated'] = 1; } return ['currency', $result, null, $osInfo]; } return false; }