MediaWiki REL1_39
|
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, ISearchResultSet $resultSet) | |
Protected Member Functions | |
rewrittenHtml ( $term, ISearchResultSet $resultSet) | |
Generates HTML shown to user when their query has been internally rewritten, and the results of the rewritten query are being returned. | |
suggestionHtml (ISearchResultSet $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. | |
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\Search\SearchWidgets\DidYouMeanWidget::__construct | ( | SpecialSearch | $specialSearch | ) |
Definition at line 17 of file DidYouMeanWidget.php.
References MediaWiki\Search\SearchWidgets\DidYouMeanWidget\$specialSearch.
MediaWiki\Search\SearchWidgets\DidYouMeanWidget::render | ( | $term, | |
ISearchResultSet | $resultSet ) |
string | $term | The user provided search term |
ISearchResultSet | $resultSet |
Definition at line 26 of file DidYouMeanWidget.php.
References ISearchResultSet\hasRewrittenQuery(), ISearchResultSet\hasSuggestion(), MediaWiki\Search\SearchWidgets\DidYouMeanWidget\rewrittenHtml(), and MediaWiki\Search\SearchWidgets\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 |
ISearchResultSet | $resultSet | The response to the search request |
Definition at line 47 of file DidYouMeanWidget.php.
References ISearchResultSet\getQueryAfterRewrite(), ISearchResultSet\getQueryAfterRewriteSnippet(), and wfDeprecatedMsg().
Referenced by MediaWiki\Search\SearchWidgets\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.
ISearchResultSet | $resultSet |
Definition at line 100 of file DidYouMeanWidget.php.
References ISearchResultSet\getSuggestionQuery(), ISearchResultSet\getSuggestionSnippet(), and wfDeprecatedMsg().
Referenced by MediaWiki\Search\SearchWidgets\DidYouMeanWidget\render().
|
protected |
Definition at line 15 of file DidYouMeanWidget.php.
Referenced by MediaWiki\Search\SearchWidgets\DidYouMeanWidget\__construct().