Handler for ParserOutput-related hooks.
More...
Handler for ParserOutput-related hooks.
- Copyright
- GPL-2.0-or-later
◆ __construct()
◆ buildOtherProjectsSidebar()
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.
- Parameters
-
- Returns
- null|array[] Array of 'In other projects' contents or null if there are none
◆ newFromGlobalState()
static Wikibase\Client\Hooks\SidebarHookHandler::newFromGlobalState |
( |
| ) |
|
|
static |
◆ onOutputPageParserOutput()
Wikibase\Client\Hooks\SidebarHookHandler::onOutputPageParserOutput |
( |
|
$out, |
|
|
|
$parserOutput |
|
) |
| |
Add output page property if repo links are suppressed, and property for item id.
- Parameters
-
OutputPage | $out | |
ParserOutput | $parserOutput | |
◆ onSidebarBeforeOutput()
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.
- Parameters
-
◆ onSkinTemplateGetLanguageLink()
Wikibase\Client\Hooks\SidebarHookHandler::onSkinTemplateGetLanguageLink |
( |
& |
$languageLink, |
|
|
|
$languageLinkTitle, |
|
|
|
$title, |
|
|
|
$output |
|
) |
| |
Add badges to the language links.
- Parameters
-
array | &$languageLink | |
Title | $languageLinkTitle | |
Title | $title | |
OutputPage | null | $output | |
◆ $badgeDisplay
Wikibase\Client\Hooks\SidebarHookHandler::$badgeDisplay |
|
private |
◆ $namespaceChecker
Wikibase\Client\Hooks\SidebarHookHandler::$namespaceChecker |
|
private |
The documentation for this class was generated from the following file: