MediaWiki REL1_34
|
Renders a 'full' multi-line search result with metadata. More...
Public Member Functions | |
__construct (SpecialSearch $specialPage, LinkRenderer $linkRenderer) | |
render (SearchResult $result, $position) | |
Protected Member Functions | |
buildMeta ( $desc, $date) | |
generateAltTitleHtml ( $msgKey, Title $title=null, $text) | |
Generates an alternate title link, such as (redirect from Foo). | |
generateCategoryHtml (SearchResult $result) | |
generateFileHtml (SearchResult $result) | |
generateMainLinkHtml (SearchResult $result, $position) | |
Generates HTML for the primary call to action. | |
generateRedirectHtml (SearchResult $result) | |
generateSectionHtml (SearchResult $result) | |
generateSizeHtml (SearchResult $result) | |
Protected Attributes | |
LinkRenderer | $linkRenderer |
SpecialSearch | $specialPage |
Renders a 'full' multi-line search result with metadata.
The Title some highlighted text about the search result 5KB (651 words) - 12:40, 6 Aug 2016
Definition at line 21 of file FullSearchResultWidget.php.
MediaWiki\Widget\Search\FullSearchResultWidget::__construct | ( | SpecialSearch | $specialPage, |
LinkRenderer | $linkRenderer | ||
) |
Definition at line 27 of file FullSearchResultWidget.php.
References MediaWiki\Widget\Search\FullSearchResultWidget\$linkRenderer, and MediaWiki\Widget\Search\FullSearchResultWidget\$specialPage.
|
protected |
string | $desc | HTML description of result, ex: size in bytes, or empty string |
string | $date | HTML representation of last edit date, or empty string |
Definition at line 280 of file FullSearchResultWidget.php.
Referenced by MediaWiki\Widget\Search\FullSearchResultWidget\render().
|
protected |
Generates an alternate title link, such as (redirect from Foo).
string | $msgKey | i18n message used to wrap title |
Title | null | $title | The title to link to, or null to generate the message without a link. In that case $text must be non-null. |
string | null | $text | The text snippet to display, or null to use the title |
Definition at line 167 of file FullSearchResultWidget.php.
References $title.
Referenced by MediaWiki\Widget\Search\FullSearchResultWidget\generateCategoryHtml(), MediaWiki\Widget\Search\FullSearchResultWidget\generateRedirectHtml(), and MediaWiki\Widget\Search\FullSearchResultWidget\generateSectionHtml().
|
protected |
SearchResult | $result |
Definition at line 203 of file FullSearchResultWidget.php.
References MediaWiki\Widget\Search\FullSearchResultWidget\generateAltTitleHtml().
Referenced by MediaWiki\Widget\Search\FullSearchResultWidget\render().
|
protected |
SearchResult | $result |
Definition at line 241 of file FullSearchResultWidget.php.
References $title, MediaWiki\MediaWikiServices\getInstance(), and NS_FILE.
Referenced by MediaWiki\Widget\Search\FullSearchResultWidget\render().
|
protected |
Generates HTML for the primary call to action.
It is typically the article title, but the search engine can return an exact snippet to use (typically the article title with highlighted words).
SearchResult | $result | |
int | $position |
Definition at line 129 of file FullSearchResultWidget.php.
References MediaWiki\Widget\Search\FullSearchResultWidget\$specialPage, and $title.
Referenced by MediaWiki\Widget\Search\FullSearchResultWidget\render().
|
protected |
SearchResult | $result |
Definition at line 181 of file FullSearchResultWidget.php.
References $title, and MediaWiki\Widget\Search\FullSearchResultWidget\generateAltTitleHtml().
Referenced by MediaWiki\Widget\Search\FullSearchResultWidget\render().
|
protected |
SearchResult | $result |
Definition at line 192 of file FullSearchResultWidget.php.
References $title, and MediaWiki\Widget\Search\FullSearchResultWidget\generateAltTitleHtml().
Referenced by MediaWiki\Widget\Search\FullSearchResultWidget\render().
|
protected |
SearchResult | $result |
Definition at line 214 of file FullSearchResultWidget.php.
References $lang, $title, and NS_CATEGORY.
Referenced by MediaWiki\Widget\Search\FullSearchResultWidget\render().
MediaWiki\Widget\Search\FullSearchResultWidget::render | ( | SearchResult | $result, |
$position | |||
) |
SearchResult | $result | The result to render |
int | $position | The result position, including offset |
Implements MediaWiki\Widget\Search\SearchResultWidget.
Definition at line 37 of file FullSearchResultWidget.php.
References $file, MediaWiki\Widget\Search\FullSearchResultWidget\buildMeta(), MediaWiki\Widget\Search\FullSearchResultWidget\generateCategoryHtml(), MediaWiki\Widget\Search\FullSearchResultWidget\generateFileHtml(), MediaWiki\Widget\Search\FullSearchResultWidget\generateMainLinkHtml(), MediaWiki\Widget\Search\FullSearchResultWidget\generateRedirectHtml(), MediaWiki\Widget\Search\FullSearchResultWidget\generateSectionHtml(), MediaWiki\Widget\Search\FullSearchResultWidget\generateSizeHtml(), and MediaWiki\MediaWikiServices\getInstance().
|
protected |
Definition at line 25 of file FullSearchResultWidget.php.
Referenced by MediaWiki\Widget\Search\FullSearchResultWidget\__construct().
|
protected |
Definition at line 23 of file FullSearchResultWidget.php.
Referenced by MediaWiki\Widget\Search\FullSearchResultWidget\__construct(), and MediaWiki\Widget\Search\FullSearchResultWidget\generateMainLinkHtml().