35 return Html::rawElement(
'div', [
'class' =>
'searchdidyoumean' ], $html );
54 $stParams = array_merge( $params, $this->specialSearch->powerSearchOptions() );
56 $linkRenderer = $this->specialSearch->getLinkRenderer();
58 if ( $snippet ===
'' || $snippet ===
null ) {
65 get_class( $resultSet ) .
'::getQueryAfterRewriteSnippet returning empty snippet ' .
66 'was deprecated in MediaWiki 1.35',
71 $rewritten = $linkRenderer->makeKnownLink(
72 $this->specialSearch->getPageTitle(),
74 [
'id' =>
'mw-search-DYM-rewritten' ],
78 $stParams[
'search'] = $term;
79 $stParams[
'runsuggestion'] = 0;
80 $original = $linkRenderer->makeKnownLink(
81 $this->specialSearch->getPageTitle(),
83 [
'id' =>
'mw-search-DYM-original' ],
87 return $this->specialSearch->msg(
'search-rewritten' )
88 ->rawParams( $rewritten, $original )
105 $stParams = array_merge( $params, $this->specialSearch->powerSearchOptions() );
108 if ( $snippet ===
'' || $snippet ===
null ) {
115 get_class( $resultSet ) .
'::getSuggestionSnippet returning empty snippet ' .
116 'was deprecated in MediaWiki 1.35',
121 $suggest = $this->specialSearch->getLinkRenderer()->makeKnownLink(
122 $this->specialSearch->getPageTitle(),
124 [
'id' =>
'mw-search-DYM-suggestion' ],
128 return $this->specialSearch->msg(
'search-suggest' )
129 ->rawParams( $suggest )->parse();
wfDeprecatedMsg( $msg, $version=false, $component=false, $callerOffset=2)
Log a deprecation warning with arbitrary message text.
This class is a collection of static functions that serve two purposes:
implements Special:Search - Run text & title search and display the output
A set of SearchEngine results.
hasRewrittenQuery()
Some search modes will run an alternative query that it thinks gives a better result than the provide...
hasSuggestion()
Some search modes return a suggested alternate term if there are no exact hits.
getQueryAfterRewriteSnippet()