MediaWiki  master
MediaWiki\Widget\Search\InterwikiSearchResultSetWidget Class Reference

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

Inheritance diagram for MediaWiki\Widget\Search\InterwikiSearchResultSetWidget:
Collaboration diagram for MediaWiki\Widget\Search\InterwikiSearchResultSetWidget:

Public Member Functions

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

Protected Member Functions

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

Protected Attributes

string[] null $customCaptions
 
InterwikiLookup $iwLookup
 
$iwPrefixDisplayTypes $iwPrefixDisplayTypes
 
LinkRenderer $linkRenderer
 
$output $output
 
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 InterwikiSearchResultSetWidget.php.

Constructor & Destructor Documentation

Member Function Documentation

MediaWiki\Widget\Search\InterwikiSearchResultSetWidget::footerHtml (   $term,
  $iwPrefix 
)
protected

Generates an HTML footer for the given interwiki prefix.

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

Definition at line 155 of file InterwikiSearchResultSetWidget.php.

References $term, Title\makeTitle(), NS_SPECIAL, and Html\rawElement().

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

MediaWiki\Widget\Search\InterwikiSearchResultSetWidget::headerHtml (   $term,
  $iwPrefix 
)
protected

Generates an appropriate HTML header for the given interwiki prefix.

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

Definition at line 127 of file InterwikiSearchResultSetWidget.php.

References Html\rawElement(), wfExpandUrl(), and wfParseUrl().

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

MediaWiki\Widget\Search\InterwikiSearchResultSetWidget::loadCustomCaptions ( )
protected
MediaWiki\Widget\Search\InterwikiSearchResultSetWidget::render (   $term,
  $resultSets 
)

Member Data Documentation

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

Definition at line 23 of file InterwikiSearchResultSetWidget.php.

InterwikiLookup MediaWiki\Widget\Search\InterwikiSearchResultSetWidget::$iwLookup
protected
$iwPrefixDisplayTypes MediaWiki\Widget\Search\InterwikiSearchResultSetWidget::$iwPrefixDisplayTypes
protected

Definition at line 31 of file InterwikiSearchResultSetWidget.php.

LinkRenderer MediaWiki\Widget\Search\InterwikiSearchResultSetWidget::$linkRenderer
protected
$output MediaWiki\Widget\Search\InterwikiSearchResultSetWidget::$output
protected

Definition at line 29 of file InterwikiSearchResultSetWidget.php.

SearchResultWidget MediaWiki\Widget\Search\InterwikiSearchResultSetWidget::$resultWidget
protected
SpecialSearch MediaWiki\Widget\Search\InterwikiSearchResultSetWidget::$specialSearch
protected

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