Wikibase
MediaWiki Wikibase extension
|
Handler for ParserOutput-related hooks. More...
Public Member Functions | |
__construct (LanguageLinkBadgeDisplay $badgeDisplay, NamespaceChecker $namespaceChecker) | |
onOutputPageParserOutput ( $out, $parserOutput) | |
Add output page property if repo links are suppressed, and property for item id. More... | |
onSkinTemplateGetLanguageLink (&$languageLink, $languageLinkTitle, $title, $output) | |
Add badges to the language links. More... | |
onSidebarBeforeOutput ( $skin, &$sidebar) | |
SidebarBeforeOutput hook handler. More... | |
buildOtherProjectsSidebar (Skin $skin) | |
Build 'In other projects' section of the sidebar, if enabled project wide or the user has the beta featured enabled. More... | |
Private Attributes | |
$namespaceChecker | |
$badgeDisplay | |
Handler for ParserOutput-related hooks.
Wikibase\Client\Hooks\SidebarHookHandler::__construct | ( | LanguageLinkBadgeDisplay | $badgeDisplay, |
NamespaceChecker | $namespaceChecker | ||
) |
Wikibase\Client\Hooks\SidebarHookHandler::buildOtherProjectsSidebar | ( | Skin | $skin | ) |
Build 'In other projects' section of the sidebar, if enabled project wide or the user has the beta featured enabled.
Skin | $skin |
Wikibase\Client\Hooks\SidebarHookHandler::onOutputPageParserOutput | ( | $out, | |
$parserOutput | |||
) |
Add output page property if repo links are suppressed, and property for item id.
OutputPage | $out | |
ParserOutput | $parserOutput |
Wikibase\Client\Hooks\SidebarHookHandler::onSidebarBeforeOutput | ( | $skin, | |
& | $sidebar | ||
) |
SidebarBeforeOutput hook handler.
This handler adds too items to the sidebar section. First it adds the 'Wikidata items' to the 'toolbox' section of the sidebar. Second it adds the 'In other projects' item which lives in its own section.
The items generation logic are handled separately for each. This callback is only concerned with adding them to the &$sidebar array (if they exist).
If current page cannot have 'Wikidata item' link, this callback will receive null value from ClientHooks::buildWikidataItemLink() method and so it will skip attempting to add the link. Same thing repeats for the second case.
Skin | $skin | |
array | &$sidebar |
Wikibase\Client\Hooks\SidebarHookHandler::onSkinTemplateGetLanguageLink | ( | & | $languageLink, |
$languageLinkTitle, | |||
$title, | |||
$output | |||
) |
Add badges to the language links.
array | &$languageLink | |
Title | $languageLinkTitle | |
Title | $title | |
OutputPage | null | $output |
|
private |
|
private |