/** * Populates the search result returning the number of requested matches plus one additional * item for being able to determine if there would be any more results. * If there are not enough exact matches, the list of returned entries will be additionally * filled with prefixed matches. * * @param array $params * * @return array[] */ private function getSearchEntries(array $params) { $searchResults = $this->entitySearchHelper->getRankedSearchResults($params['search'], $params['language'], $params['type'], $params['continue'] + $params['limit'] + 1, $params['strictlanguage']); $entries = array(); foreach ($searchResults as $match) { $entries[] = $this->buildTermSearchMatchEntry($match); } return $entries; }
/** * @param array $params * * @return TermSearchResult[] */ private function getSearchResults(array $params) { return $this->entitySearchHelper->getRankedSearchResults($params['search'], $params['language'] ?: $this->getLanguage()->getCode(), $params['type'], $params['limit'], $params['strictlanguage']); }