MediaWiki REL1_34
MediaWiki\Widget\Search\SimpleSearchResultSetWidget Class Reference

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

Inheritance diagram for MediaWiki\Widget\Search\SimpleSearchResultSetWidget:
Collaboration diagram for MediaWiki\Widget\Search\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\Widget\Search\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 93 of file SimpleSearchResultSetWidget.php.

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

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

◆ loadCustomCaptions()

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

◆ render()

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

Implements MediaWiki\Widget\Search\SearchResultSetWidget.

Definition at line 50 of file SimpleSearchResultSetWidget.php.

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

Member Data Documentation

◆ $customCaptions

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

Definition at line 25 of file SimpleSearchResultSetWidget.php.

◆ $iwLookup

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

◆ $linkRenderer

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

◆ $resultWidget

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

◆ $specialSearch

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

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