namespace MediaWiki\Widget\Search;
use HtmlArmor;
-use SearchResultSet;
+use ISearchResultSet;
use SpecialSearch;
/**
/**
* @param string $term The user provided search term
- * @param SearchResultSet $resultSet
+ * @param ISearchResultSet $resultSet
* @return string HTML
*/
- public function render( $term, SearchResultSet $resultSet ) {
+ public function render( $term, ISearchResultSet $resultSet ) {
if ( $resultSet->hasRewrittenQuery() ) {
$html = $this->rewrittenHtml( $term, $resultSet );
} elseif ( $resultSet->hasSuggestion() ) {
* rewritten, and the results of the rewritten query are being returned.
*
* @param string $term The users search input
- * @param SearchResultSet $resultSet The response to the search request
+ * @param ISearchResultSet $resultSet The response to the search request
* @return string HTML Links the user to their original $term query, and the
* one suggested by $resultSet
*/
- protected function rewrittenHtml( $term, SearchResultSet $resultSet ) {
+ protected function rewrittenHtml( $term, ISearchResultSet $resultSet ) {
$params = [
'search' => $resultSet->getQueryAfterRewrite(),
// Don't magic this link into a 'go' link, it should always
// show search results.
- 'fultext' => 1,
+ 'fulltext' => 1,
];
$stParams = array_merge( $params, $this->specialSearch->powerSearchOptions() );
$original = $linkRenderer->makeKnownLink(
$this->specialSearch->getPageTitle(),
$term,
- [ 'id' => 'mwsearch-DYM-original' ],
+ [ 'id' => 'mw-search-DYM-original' ],
$stParams
);
* a query that might give more/better results than their current
* query.
*
- * @param SearchResultSet $resultSet
+ * @param ISearchResultSet $resultSet
* @return string HTML
*/
- protected function suggestionHtml( SearchResultSet $resultSet ) {
+ protected function suggestionHtml( ISearchResultSet $resultSet ) {
$params = [
'search' => $resultSet->getSuggestionQuery(),
'fulltext' => 1,