MediaWiki
1.30.2
|
Renders a suggested search for the user, or tells the user a suggested search was run instead of the one provided. More...
Public Member Functions | |
__construct (SpecialSearch $specialSearch) | |
render ( $term, SearchResultSet $resultSet) | |
Protected Member Functions | |
rewrittenHtml ( $term, SearchResultSet $resultSet) | |
Generates HTML shown to user when their query has been internally rewritten, and the results of the rewritten query are being returned. More... | |
suggestionHtml (SearchResultSet $resultSet) | |
Generates HTML shown to the user when we have a suggestion about a query that might give more/better results than their current query. More... | |
Protected Attributes | |
SpecialSearch | $specialSearch |
Renders a suggested search for the user, or tells the user a suggested search was run instead of the one provided.
Definition at line 13 of file DidYouMeanWidget.php.
MediaWiki\Widget\Search\DidYouMeanWidget::__construct | ( | SpecialSearch | $specialSearch | ) |
Definition at line 17 of file DidYouMeanWidget.php.
References MediaWiki\Widget\Search\DidYouMeanWidget\$specialSearch.
MediaWiki\Widget\Search\DidYouMeanWidget::render | ( | $term, | |
SearchResultSet | $resultSet | ||
) |
string | $term | The user provided search term |
SearchResultSet | $resultSet |
Definition at line 26 of file DidYouMeanWidget.php.
References $html, $term, SearchResultSet\hasRewrittenQuery(), SearchResultSet\hasSuggestion(), MediaWiki\Widget\Search\DidYouMeanWidget\rewrittenHtml(), and MediaWiki\Widget\Search\DidYouMeanWidget\suggestionHtml().
|
protected |
Generates HTML shown to user when their query has been internally rewritten, and the results of the rewritten query are being returned.
string | $term | The users search input |
SearchResultSet | $resultSet | The response to the search request |
Definition at line 47 of file DidYouMeanWidget.php.
References $linkRenderer, $params, $term, SearchResultSet\getQueryAfterRewrite(), and SearchResultSet\getQueryAfterRewriteSnippet().
Referenced by MediaWiki\Widget\Search\DidYouMeanWidget\render().
|
protected |
Generates HTML shown to the user when we have a suggestion about a query that might give more/better results than their current query.
SearchResultSet | $resultSet |
Definition at line 87 of file DidYouMeanWidget.php.
References $params, SearchResultSet\getSuggestionQuery(), and SearchResultSet\getSuggestionSnippet().
Referenced by MediaWiki\Widget\Search\DidYouMeanWidget\render().
|
protected |
Definition at line 15 of file DidYouMeanWidget.php.
Referenced by MediaWiki\Widget\Search\DidYouMeanWidget\__construct().