MediaWiki REL1_39
MediaWiki\Search\SearchWidgets\SimpleSearchResultSetWidget Class Reference

Renders one or more ISearchResultSets into a sidebar grouped by interwiki prefix. More...

Inheritance diagram for MediaWiki\Search\SearchWidgets\SimpleSearchResultSetWidget:
Collaboration diagram for MediaWiki\Search\SearchWidgets\SimpleSearchResultSetWidget:

Public Member Functions

 __construct (SpecialSearch $specialSearch, SearchResultWidget $resultWidget, LinkRenderer $linkRenderer, InterwikiLookup $iwLookup)
 
 render ( $term, $resultSets)
 

Protected Member Functions

 headerHtml ( $iwPrefix, $term)
 Generates an appropriate HTML header for the given interwiki prefix.
 
 loadCustomCaptions ()
 

Protected Attributes

string[] null $customCaptions
 
InterwikiLookup $iwLookup
 
LinkRenderer $linkRenderer
 
SearchResultWidget $resultWidget
 
SpecialSearch $specialSearch
 

Detailed Description

Renders one or more ISearchResultSets into a sidebar grouped by interwiki prefix.

Includes a per-wiki header indicating where the results are from.

Deprecated
since 1.31. Use InterwikiSearchResultSetWidget

Definition at line 19 of file SimpleSearchResultSetWidget.php.

Constructor & Destructor Documentation

◆ __construct()

Member Function Documentation

◆ headerHtml()

MediaWiki\Search\SearchWidgets\SimpleSearchResultSetWidget::headerHtml ( $iwPrefix,
$term )
protected

Generates an appropriate HTML header for the given interwiki prefix.

Parameters
string$iwPrefixInterwiki prefix of wiki to show header for
string$termUser provided search term
Returns
string HTML

Definition at line 96 of file SimpleSearchResultSetWidget.php.

References NS_SPECIAL, wfExpandUrl(), and wfParseUrl().

Referenced by MediaWiki\Search\SearchWidgets\SimpleSearchResultSetWidget\render().

◆ loadCustomCaptions()

MediaWiki\Search\SearchWidgets\SimpleSearchResultSetWidget::loadCustomCaptions ( )
protected

◆ render()

MediaWiki\Search\SearchWidgets\SimpleSearchResultSetWidget::render ( $term,
$resultSets )
Parameters
string$termUser provided search term
ISearchResultSet | ISearchResultSet[]$resultSetsList of interwiki results to render.
Returns
string HTML

Implements MediaWiki\Search\SearchWidgets\SearchResultSetWidget.

Definition at line 50 of file SimpleSearchResultSetWidget.php.

References MediaWiki\Search\SearchWidgets\SimpleSearchResultSetWidget\headerHtml(), and MediaWiki\Search\SearchWidgets\SimpleSearchResultSetWidget\loadCustomCaptions().

Member Data Documentation

◆ $customCaptions

string [] null MediaWiki\Search\SearchWidgets\SimpleSearchResultSetWidget::$customCaptions
protected

Definition at line 25 of file SimpleSearchResultSetWidget.php.

◆ $iwLookup

InterwikiLookup MediaWiki\Search\SearchWidgets\SimpleSearchResultSetWidget::$iwLookup
protected

◆ $linkRenderer

LinkRenderer MediaWiki\Search\SearchWidgets\SimpleSearchResultSetWidget::$linkRenderer
protected

◆ $resultWidget

SearchResultWidget MediaWiki\Search\SearchWidgets\SimpleSearchResultSetWidget::$resultWidget
protected

◆ $specialSearch

SpecialSearch MediaWiki\Search\SearchWidgets\SimpleSearchResultSetWidget::$specialSearch
protected

The documentation for this class was generated from the following file: