MediaWiki  1.30.2
MediaWiki\Widget\Search\SimpleSearchResultSetWidget Class Reference

Renders one or more SearchResultSets 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. More...
 
 loadCustomCaptions ()
 

Protected Attributes

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

Detailed Description

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

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

Definition at line 17 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 $term, Title\makeTitle(), NS_SPECIAL, Html\rawElement(), 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
SearchResultSet | SearchResultSet[]$resultSetsList of interwiki results to render.
Returns
string HTML

Implements MediaWiki\Widget\Search\SearchResultSetWidget.

Definition at line 47 of file SimpleSearchResultSetWidget.php.

References $out, $term, as, 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 23 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: