MediaWiki REL1_39
|
Renders one or more ISearchResultSets into a sidebar grouped by interwiki prefix. More...
Public Member Functions | |
__construct (SpecialSearch $specialSearch, SearchResultWidget $resultWidget, LinkRenderer $linkRenderer, InterwikiLookup $iwLookup, $showMultimedia=false) | |
render ( $term, $resultSets) | |
Protected Member Functions | |
footerHtml ( $term, $iwPrefix) | |
Generates an HTML footer for the given interwiki prefix. | |
headerHtml ( $term, $iwPrefix) | |
Generates an HTML header for the given interwiki prefix. | |
iwIcon ( $iwPrefix) | |
Generates a custom OOUI icon element with a favicon as the image. | |
loadCustomCaptions () | |
Protected Attributes | |
string[] null | $customCaptions |
InterwikiLookup | $iwLookup |
LinkRenderer | $linkRenderer |
OutputPage | $output |
SearchResultWidget | $resultWidget |
bool | $showMultimedia |
SpecialSearch | $specialSearch |
Renders one or more ISearchResultSets into a sidebar grouped by interwiki prefix.
Includes a per-wiki header indicating where the results are from.
Definition at line 18 of file InterwikiSearchResultSetWidget.php.
MediaWiki\Search\SearchWidgets\InterwikiSearchResultSetWidget::__construct | ( | SpecialSearch | $specialSearch, |
SearchResultWidget | $resultWidget, | ||
LinkRenderer | $linkRenderer, | ||
InterwikiLookup | $iwLookup, | ||
$showMultimedia = false ) |
Definition at line 34 of file InterwikiSearchResultSetWidget.php.
References MediaWiki\Search\SearchWidgets\InterwikiSearchResultSetWidget\$iwLookup, MediaWiki\Search\SearchWidgets\InterwikiSearchResultSetWidget\$linkRenderer, MediaWiki\Search\SearchWidgets\InterwikiSearchResultSetWidget\$resultWidget, MediaWiki\Search\SearchWidgets\InterwikiSearchResultSetWidget\$showMultimedia, MediaWiki\Search\SearchWidgets\InterwikiSearchResultSetWidget\$specialSearch, and SpecialPage\getOutput().
|
protected |
Generates an HTML footer for the given interwiki prefix.
string | $term | User provided search term |
string | $iwPrefix | Interwiki prefix of wiki to show heading for |
Definition at line 144 of file InterwikiSearchResultSetWidget.php.
References NS_SPECIAL, wfExpandUrl(), and wfParseUrl().
Referenced by MediaWiki\Search\SearchWidgets\InterwikiSearchResultSetWidget\render().
|
protected |
Generates an HTML header for the given interwiki prefix.
string | $term | User provided search term |
string | $iwPrefix | Interwiki prefix of wiki to show heading for |
Definition at line 120 of file InterwikiSearchResultSetWidget.php.
References MediaWiki\Search\SearchWidgets\InterwikiSearchResultSetWidget\iwIcon(), NS_SPECIAL, wfExpandUrl(), and wfParseUrl().
Referenced by MediaWiki\Search\SearchWidgets\InterwikiSearchResultSetWidget\render().
|
protected |
Generates a custom OOUI icon element with a favicon as the image.
The favicon image URL is generated by parsing the interwiki URL and returning the default location of the favicon for that domain, which is assumed to be '/favicon.ico'.
string | $iwPrefix | Interwiki prefix |
Definition at line 185 of file InterwikiSearchResultSetWidget.php.
References wfExpandUrl(), and wfParseUrl().
Referenced by MediaWiki\Search\SearchWidgets\InterwikiSearchResultSetWidget\headerHtml().
|
protected |
Definition at line 161 of file InterwikiSearchResultSetWidget.php.
References $line.
Referenced by MediaWiki\Search\SearchWidgets\InterwikiSearchResultSetWidget\render().
MediaWiki\Search\SearchWidgets\InterwikiSearchResultSetWidget::render | ( | $term, | |
$resultSets ) |
string | $term | User provided search term |
ISearchResultSet | ISearchResultSet[] | $resultSets | List of interwiki results to render. |
Implements MediaWiki\Search\SearchWidgets\SearchResultSetWidget.
Definition at line 55 of file InterwikiSearchResultSetWidget.php.
References MediaWiki\Search\SearchWidgets\InterwikiSearchResultSetWidget\footerHtml(), MediaWiki\Search\SearchWidgets\InterwikiSearchResultSetWidget\headerHtml(), and MediaWiki\Search\SearchWidgets\InterwikiSearchResultSetWidget\loadCustomCaptions().
|
protected |
Definition at line 24 of file InterwikiSearchResultSetWidget.php.
|
protected |
Definition at line 28 of file InterwikiSearchResultSetWidget.php.
Referenced by MediaWiki\Search\SearchWidgets\InterwikiSearchResultSetWidget\__construct().
|
protected |
Definition at line 26 of file InterwikiSearchResultSetWidget.php.
Referenced by MediaWiki\Search\SearchWidgets\InterwikiSearchResultSetWidget\__construct().
|
protected |
Definition at line 30 of file InterwikiSearchResultSetWidget.php.
|
protected |
Definition at line 22 of file InterwikiSearchResultSetWidget.php.
Referenced by MediaWiki\Search\SearchWidgets\InterwikiSearchResultSetWidget\__construct().
|
protected |
Definition at line 32 of file InterwikiSearchResultSetWidget.php.
Referenced by MediaWiki\Search\SearchWidgets\InterwikiSearchResultSetWidget\__construct().
|
protected |
Definition at line 20 of file InterwikiSearchResultSetWidget.php.
Referenced by MediaWiki\Search\SearchWidgets\InterwikiSearchResultSetWidget\__construct().