MediaWiki REL1_40
|
Renders a 'full' multi-line search result with metadata. More...
Inherits MediaWiki\Search\SearchWidgets\SearchResultWidget.
Public Member Functions | |
__construct (SpecialSearch $specialPage, LinkRenderer $linkRenderer, HookContainer $hookContainer, RepoGroup $repoGroup, SearchResultThumbnailProvider $thumbnailProvider, UserOptionsManager $userOptionsManager) | |
render (SearchResult $result, $position) | |
Protected Member Functions | |
buildMeta ( $desc, $date) | |
generateAltTitleHtml ( $msgKey, ?Title $title, $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 5 KiB (651 words) - 12:40, 6 Aug 2016
Definition at line 29 of file FullSearchResultWidget.php.
MediaWiki\Search\SearchWidgets\FullSearchResultWidget::__construct | ( | SpecialSearch | $specialPage, |
LinkRenderer | $linkRenderer, | ||
HookContainer | $hookContainer, | ||
RepoGroup | $repoGroup, | ||
SearchResultThumbnailProvider | $thumbnailProvider, | ||
UserOptionsManager | $userOptionsManager ) |
Definition at line 47 of file FullSearchResultWidget.php.
References MediaWiki\Search\SearchWidgets\FullSearchResultWidget\$linkRenderer, and MediaWiki\Search\SearchWidgets\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 470 of file FullSearchResultWidget.php.
Referenced by MediaWiki\Search\SearchWidgets\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 214 of file FullSearchResultWidget.php.
References $title.
Referenced by MediaWiki\Search\SearchWidgets\FullSearchResultWidget\generateCategoryHtml(), MediaWiki\Search\SearchWidgets\FullSearchResultWidget\generateRedirectHtml(), and MediaWiki\Search\SearchWidgets\FullSearchResultWidget\generateSectionHtml().
|
protected |
SearchResult | $result |
Definition at line 250 of file FullSearchResultWidget.php.
References MediaWiki\Search\SearchWidgets\FullSearchResultWidget\generateAltTitleHtml().
Referenced by MediaWiki\Search\SearchWidgets\FullSearchResultWidget\render().
|
protected |
SearchResult | $result |
Definition at line 285 of file FullSearchResultWidget.php.
References $title, and NS_FILE.
Referenced by MediaWiki\Search\SearchWidgets\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 176 of file FullSearchResultWidget.php.
References MediaWiki\Search\SearchWidgets\FullSearchResultWidget\$specialPage, and $title.
Referenced by MediaWiki\Search\SearchWidgets\FullSearchResultWidget\render().
|
protected |
SearchResult | $result |
Definition at line 228 of file FullSearchResultWidget.php.
References $title, and MediaWiki\Search\SearchWidgets\FullSearchResultWidget\generateAltTitleHtml().
Referenced by MediaWiki\Search\SearchWidgets\FullSearchResultWidget\render().
|
protected |
SearchResult | $result |
Definition at line 239 of file FullSearchResultWidget.php.
References $title, and MediaWiki\Search\SearchWidgets\FullSearchResultWidget\generateAltTitleHtml().
Referenced by MediaWiki\Search\SearchWidgets\FullSearchResultWidget\render().
|
protected |
SearchResult | $result |
Definition at line 261 of file FullSearchResultWidget.php.
References $title, and NS_CATEGORY.
Referenced by MediaWiki\Search\SearchWidgets\FullSearchResultWidget\render().
MediaWiki\Search\SearchWidgets\FullSearchResultWidget::render | ( | SearchResult | $result, |
$position ) |
SearchResult | $result | The result to render |
int | $position | The result position, including offset |
Implements MediaWiki\Search\SearchWidgets\SearchResultWidget.
Definition at line 68 of file FullSearchResultWidget.php.
References $file, MediaWiki\Search\SearchWidgets\FullSearchResultWidget\buildMeta(), MediaWiki\Search\SearchWidgets\FullSearchResultWidget\generateCategoryHtml(), MediaWiki\Search\SearchWidgets\FullSearchResultWidget\generateFileHtml(), MediaWiki\Search\SearchWidgets\FullSearchResultWidget\generateMainLinkHtml(), MediaWiki\Search\SearchWidgets\FullSearchResultWidget\generateRedirectHtml(), MediaWiki\Search\SearchWidgets\FullSearchResultWidget\generateSectionHtml(), MediaWiki\Search\SearchWidgets\FullSearchResultWidget\generateSizeHtml(), and NS_FILE.
|
protected |
Definition at line 35 of file FullSearchResultWidget.php.
Referenced by MediaWiki\Search\SearchWidgets\FullSearchResultWidget\__construct().
|
protected |
Definition at line 33 of file FullSearchResultWidget.php.
Referenced by MediaWiki\Search\SearchWidgets\FullSearchResultWidget\__construct(), and MediaWiki\Search\SearchWidgets\FullSearchResultWidget\generateMainLinkHtml().