Creates views for lists of site links.
More...
|
| __construct (TemplateFactory $templateFactory, SiteList $sites, EditSectionGenerator $sectionEditLinkGenerator, EntityIdFormatter $entityIdFormatter, LanguageNameLookup $languageNameLookup, NumberLocalizer $numberLocalizer, array $badgeItems, array $specialSiteLinkGroups, LocalizedTextProvider $textProvider) |
|
| getHtml (array $siteLinks, ?ItemId $itemId, array $groups) |
| Builds and returns the HTML representing a WikibaseEntity's site-links. More...
|
|
◆ __construct()
- Parameters
-
TemplateFactory | $templateFactory | |
SiteList | $sites | |
EditSectionGenerator | $sectionEditLinkGenerator | |
EntityIdFormatter | $entityIdFormatter | A plaintext producing EntityIdFormatter |
LanguageNameLookup | $languageNameLookup | |
NumberLocalizer | $numberLocalizer | |
string[] | $badgeItems | |
string[] | $specialSiteLinkGroups | |
LocalizedTextProvider | $textProvider | |
◆ getHtml()
Wikibase\View\SiteLinksView::getHtml |
( |
array |
$siteLinks, |
|
|
?ItemId |
$itemId, |
|
|
array |
$groups |
|
) |
| |
Builds and returns the HTML representing a WikibaseEntity's site-links.
- Parameters
-
SiteLink[] | $siteLinks | the site links to render |
ItemId | null | $itemId | The id of the item or might be null, if a new item. |
string[] | $groups | An array of site group IDs |
- Returns
- string HTML
◆ getHtmlForBadges()
Wikibase\View\SiteLinksView::getHtmlForBadges |
( |
array |
$badges | ) |
|
|
private |
- Parameters
-
- Returns
- string HTML
◆ getHtmlForPage()
Wikibase\View\SiteLinksView::getHtmlForPage |
( |
SiteLink |
$siteLink, |
|
|
Site |
$site |
|
) |
| |
|
private |
- Parameters
-
SiteLink | $siteLink | |
Site | $site | |
- Returns
- string HTML
◆ getHtmlForSectionHeading()
Wikibase\View\SiteLinksView::getHtmlForSectionHeading |
( |
|
$heading | ) |
|
|
private |
Returns the HTML for the heading of the sitelinks section.
- Parameters
-
string | $heading | message key of the heading; also used as css class |
- Returns
- string HTML
◆ getHtmlForSiteLinkGroup()
Wikibase\View\SiteLinksView::getHtmlForSiteLinkGroup |
( |
array |
$siteLinks, |
|
|
?ItemId |
$itemId, |
|
|
|
$group |
|
) |
| |
|
private |
Builds and returns the HTML representing a group of a WikibaseEntity's site-links.
- Parameters
-
SiteLink[] | $siteLinks | the site links to render |
ItemId | null | $itemId | The id of the item |
string | $group | a site group ID |
- Returns
- string HTML
◆ getHtmlForSiteLinks()
Wikibase\View\SiteLinksView::getHtmlForSiteLinks |
( |
array |
$siteLinksForTable, |
|
|
|
$isSpecialGroup |
|
) |
| |
|
private |
- Parameters
-
array[] | $siteLinksForTable | |
bool | $isSpecialGroup | |
- Returns
- string HTML
◆ getHtmlForUnknownSiteLink()
Wikibase\View\SiteLinksView::getHtmlForUnknownSiteLink |
( |
SiteLink |
$siteLink | ) |
|
|
private |
- Parameters
-
- Returns
- string HTML
◆ getSitesForGroup()
Wikibase\View\SiteLinksView::getSitesForGroup |
( |
|
$group | ) |
|
|
private |
Get all sites for a given site group, with special handling for the "special" site group.
- Parameters
-
- Returns
- SiteList
◆ $badgeItems
Wikibase\View\SiteLinksView::$badgeItems |
|
private |
◆ $entityIdFormatter
Wikibase\View\SiteLinksView::$entityIdFormatter |
|
private |
◆ $languageNameLookup
Wikibase\View\SiteLinksView::$languageNameLookup |
|
private |
◆ $numberLocalizer
Wikibase\View\SiteLinksView::$numberLocalizer |
|
private |
◆ $sectionEditLinkGenerator
Wikibase\View\SiteLinksView::$sectionEditLinkGenerator |
|
private |
◆ $sites
Wikibase\View\SiteLinksView::$sites |
|
private |
◆ $specialSiteLinkGroups
Wikibase\View\SiteLinksView::$specialSiteLinkGroups |
|
private |
◆ $templateFactory
Wikibase\View\SiteLinksView::$templateFactory |
|
private |
◆ $textProvider
Wikibase\View\SiteLinksView::$textProvider |
|
private |
The documentation for this class was generated from the following file: