Handler for the "OutputPageBeforeHTML" hook.
More...
|
| __construct (HttpRequestFactory $httpRequestFactory, IBufferingStatsdDataFactory $statsdDataFactory, SettingsArray $repoSettings, TemplateFactory $templateFactory, EntityRevisionLookup $entityRevisionLookup, LanguageNameLookupFactory $languageNameLookupFactory, OutputPageEntityIdReader $outputPageEntityIdReader, EntityFactory $entityFactory, $cookiePrefix, OutputPageEditability $editability, $isExternallyRendered, UserPreferredContentLanguagesLookup $userPreferredTermsLanguages, OutputPageEntityViewChecker $entityViewChecker, LanguageFallbackChainFactory $languageFallbackChainFactory, UserOptionsLookup $userOptionsLookup, LanguageDirectionalityLookup $languageDirectionalityLookup, LoggerInterface $logger=null) |
|
| onOutputPageBeforeHTML ( $out, &$html) |
| Called when pushing HTML from the ParserOutput into OutputPage.
|
|
|
static | factory (Language $contentLanguage, HttpRequestFactory $httpRequestFactory, IBufferingStatsdDataFactory $statsdDataFactory, UserOptionsLookup $userOptionsLookup, EntityContentFactory $entityContentFactory, EntityFactory $entityFactory, EntityIdParser $entityIdParser, EntityRevisionLookup $entityRevisionLookup, LanguageDirectionalityLookup $languageDirectionalityLookup, LanguageFallbackChainFactory $languageFallbackChainFactory, LanguageNameLookupFactory $languageNameLookupFactory, LoggerInterface $logger, SettingsArray $settings, ContentLanguages $termsLanguages) |
|
Handler for the "OutputPageBeforeHTML" hook.
- Copyright
- GPL-2.0-or-later
- Author
- Marius Hoch < hoo@o.nosp@m.nlin.nosp@m.e.de >
◆ __construct()
Wikibase\Repo\Hooks\OutputPageBeforeHTMLHookHandler::__construct |
( |
HttpRequestFactory | $httpRequestFactory, |
|
|
IBufferingStatsdDataFactory | $statsdDataFactory, |
|
|
SettingsArray | $repoSettings, |
|
|
TemplateFactory | $templateFactory, |
|
|
EntityRevisionLookup | $entityRevisionLookup, |
|
|
LanguageNameLookupFactory | $languageNameLookupFactory, |
|
|
OutputPageEntityIdReader | $outputPageEntityIdReader, |
|
|
EntityFactory | $entityFactory, |
|
|
| $cookiePrefix, |
|
|
OutputPageEditability | $editability, |
|
|
| $isExternallyRendered, |
|
|
UserPreferredContentLanguagesLookup | $userPreferredTermsLanguages, |
|
|
OutputPageEntityViewChecker | $entityViewChecker, |
|
|
LanguageFallbackChainFactory | $languageFallbackChainFactory, |
|
|
UserOptionsLookup | $userOptionsLookup, |
|
|
LanguageDirectionalityLookup | $languageDirectionalityLookup, |
|
|
LoggerInterface | $logger = null ) |
◆ factory()
static Wikibase\Repo\Hooks\OutputPageBeforeHTMLHookHandler::factory |
( |
Language | $contentLanguage, |
|
|
HttpRequestFactory | $httpRequestFactory, |
|
|
IBufferingStatsdDataFactory | $statsdDataFactory, |
|
|
UserOptionsLookup | $userOptionsLookup, |
|
|
EntityContentFactory | $entityContentFactory, |
|
|
EntityFactory | $entityFactory, |
|
|
EntityIdParser | $entityIdParser, |
|
|
EntityRevisionLookup | $entityRevisionLookup, |
|
|
LanguageDirectionalityLookup | $languageDirectionalityLookup, |
|
|
LanguageFallbackChainFactory | $languageFallbackChainFactory, |
|
|
LanguageNameLookupFactory | $languageNameLookupFactory, |
|
|
LoggerInterface | $logger, |
|
|
SettingsArray | $settings, |
|
|
ContentLanguages | $termsLanguages ) |
|
static |
◆ getEntity()
Wikibase\Repo\Hooks\OutputPageBeforeHTMLHookHandler::getEntity |
( |
OutputPage | $out | ) |
|
|
private |
◆ getEntityId()
Wikibase\Repo\Hooks\OutputPageBeforeHTMLHookHandler::getEntityId |
( |
OutputPage | $out | ) |
|
|
private |
◆ getEntityTermsListHtml()
Wikibase\Repo\Hooks\OutputPageBeforeHTMLHookHandler::getEntityTermsListHtml |
( |
OutputPage | $out | ) |
|
|
private |
◆ getExternallyRenderedEntityViewPlaceholderExpander()
Wikibase\Repo\Hooks\OutputPageBeforeHTMLHookHandler::getExternallyRenderedEntityViewPlaceholderExpander |
( |
OutputPage | $out | ) |
|
|
private |
◆ getLocallyRenderedEntityViewPlaceholderExpander()
Wikibase\Repo\Hooks\OutputPageBeforeHTMLHookHandler::getLocallyRenderedEntityViewPlaceholderExpander |
( |
EntityDocument | $entity, |
|
|
OutputPage | $out ) |
|
private |
◆ getPlaceholderExpander()
Wikibase\Repo\Hooks\OutputPageBeforeHTMLHookHandler::getPlaceholderExpander |
( |
EntityDocument | $entity, |
|
|
OutputPage | $out ) |
|
private |
◆ getTermsLanguages()
Wikibase\Repo\Hooks\OutputPageBeforeHTMLHookHandler::getTermsLanguages |
( |
array | $userPreferredTermsLanguages, |
|
|
EntityDocument | $entity, |
|
|
array | $entityTermsListHtml ) |
|
private |
Get the term languages to use for the current user and entity.
◆ onOutputPageBeforeHTML()
Wikibase\Repo\Hooks\OutputPageBeforeHTMLHookHandler::onOutputPageBeforeHTML |
( |
| $out, |
|
|
& | $html ) |
Called when pushing HTML from the ParserOutput into OutputPage.
Used to expand any placeholders in the OutputPage's 'wb-placeholders' property in the HTML.
- Parameters
-
OutputPage | $out | |
string | &$html | the HTML to mangle |
◆ replacePlaceholders()
Wikibase\Repo\Hooks\OutputPageBeforeHTMLHookHandler::replacePlaceholders |
( |
OutputPage | $out, |
|
|
string | $html ) |
|
private |
◆ showOrHideEditLinks()
Wikibase\Repo\Hooks\OutputPageBeforeHTMLHookHandler::showOrHideEditLinks |
( |
OutputPage | $out, |
|
|
string | $html ) |
|
private |
◆ $cookiePrefix
string Wikibase\Repo\Hooks\OutputPageBeforeHTMLHookHandler::$cookiePrefix |
|
private |
◆ $editability
◆ $entityFactory
EntityFactory Wikibase\Repo\Hooks\OutputPageBeforeHTMLHookHandler::$entityFactory |
|
private |
◆ $entityRevisionLookup
◆ $entityViewChecker
◆ $httpRequestFactory
HttpRequestFactory Wikibase\Repo\Hooks\OutputPageBeforeHTMLHookHandler::$httpRequestFactory |
|
private |
◆ $isExternallyRendered
bool Wikibase\Repo\Hooks\OutputPageBeforeHTMLHookHandler::$isExternallyRendered |
|
private |
◆ $languageDirectionalityLookup
◆ $languageFallbackChainFactory
◆ $languageNameLookupFactory
◆ $logger
LoggerInterface Wikibase\Repo\Hooks\OutputPageBeforeHTMLHookHandler::$logger |
|
private |
◆ $outputPageEntityIdReader
◆ $repoSettings
SettingsArray Wikibase\Repo\Hooks\OutputPageBeforeHTMLHookHandler::$repoSettings |
|
private |
◆ $statsDataFactory
IBufferingStatsdDataFactory Wikibase\Repo\Hooks\OutputPageBeforeHTMLHookHandler::$statsDataFactory |
|
private |
◆ $templateFactory
TemplateFactory Wikibase\Repo\Hooks\OutputPageBeforeHTMLHookHandler::$templateFactory |
|
private |
◆ $userOptionsLookup
UserOptionsLookup Wikibase\Repo\Hooks\OutputPageBeforeHTMLHookHandler::$userOptionsLookup |
|
private |
◆ $userPreferredTermsLanguages
The documentation for this class was generated from the following file: