Daniel Kinzler has uploaded a new change for review.
https://gerrit.wikimedia.org/r/159301
Change subject: Rename ParserOutputHooks to SidebarHookHandlers
......................................................................
Rename ParserOutputHooks to SidebarHookHandlers
The hook handler functions in this class funnel information
from the Parser via ParserOutput and OutputPage into SkinTemplate,
in order to inject links into the sidebar.
Change-Id: I27c7e487d48f11a13a43b256c0790ec4c94c6563
---
M client/WikibaseClient.php
R client/includes/hooks/SidebarHookHandlers.php
M client/tests/phpunit/includes/hooks/ParserOutputHooksTest.php
3 files changed, 13 insertions(+), 13 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase
refs/changes/01/159301/1
diff --git a/client/WikibaseClient.php b/client/WikibaseClient.php
index f8acec8..0afd6af 100644
--- a/client/WikibaseClient.php
+++ b/client/WikibaseClient.php
@@ -91,9 +91,9 @@
$wgHooks['UnitTestsList'][] =
'\Wikibase\ClientHooks::registerUnitTests';
$wgHooks['BaseTemplateToolbox'][] =
'\Wikibase\ClientHooks::onBaseTemplateToolbox';
$wgHooks['OldChangesListRecentChangesLine'][] =
'\Wikibase\ClientHooks::onOldChangesListRecentChangesLine';
- $wgHooks['OutputPageParserOutput'][] =
'\Wikibase\Client\Hooks\ParserOutputHooks::onOutputPageParserOutput';
- $wgHooks['SkinTemplateGetLanguageLink'][] =
'\Wikibase\Client\Hooks\ParserOutputHooks::onOutputPageParserOutput';
- $wgHooks['ParserAfterParse'][] =
'\Wikibase\Client\Hooks\ParserOutputHooks::onParserAfterParse';
+ $wgHooks['OutputPageParserOutput'][] =
'\Wikibase\Client\Hooks\SidebarHookHandlers::onOutputPageParserOutput';
+ $wgHooks['SkinTemplateGetLanguageLink'][] =
'\Wikibase\Client\Hooks\SidebarHookHandlers::onOutputPageParserOutput';
+ $wgHooks['ParserAfterParse'][] =
'\Wikibase\Client\Hooks\SidebarHookHandlers::onParserAfterParse';
$wgHooks['ParserFirstCallInit'][] =
'\Wikibase\ClientHooks::onParserFirstCallInit';
$wgHooks['MagicWordwgVariableIDs'][] =
'\Wikibase\ClientHooks::onMagicWordwgVariableIDs';
$wgHooks['ParserGetVariableValueSwitch'][] =
'\Wikibase\ClientHooks::onParserGetVariableValueSwitch';
diff --git a/client/includes/hooks/ParserOutputHooks.php
b/client/includes/hooks/SidebarHookHandlers.php
similarity index 97%
rename from client/includes/hooks/ParserOutputHooks.php
rename to client/includes/hooks/SidebarHookHandlers.php
index fb43148..197348b 100644
--- a/client/includes/hooks/ParserOutputHooks.php
+++ b/client/includes/hooks/SidebarHookHandlers.php
@@ -16,7 +16,7 @@
* ParserOutput related hook handlers.
*
* This class has a static interface for use with MediaWiki's hook mechanism;
the static
- * handler functions will create a new instance of ParserOutputHooks and then
call the
+ * handler functions will create a new instance of SidebarHookHandlers and
then call the
* corresponding member function on that.
*
* @since 0.5.
@@ -27,7 +27,7 @@
* @author Jeroen De Dauw < [email protected] >
* @author Marius Hoch < [email protected] >
*/
-class ParserOutputHooks {
+class SidebarHookHandlers {
/**
* @var NamespaceChecker
@@ -82,7 +82,7 @@
$settings->getSetting( 'sortPrepend' )
);
- return new ParserOutputHooks(
+ return new SidebarHookHandlers(
$namespaceChecker,
$langLinkHandler,
$badgeDisplay,
diff --git a/client/tests/phpunit/includes/hooks/ParserOutputHooksTest.php
b/client/tests/phpunit/includes/hooks/ParserOutputHooksTest.php
index b9a0e51..fedc8ac 100644
--- a/client/tests/phpunit/includes/hooks/ParserOutputHooksTest.php
+++ b/client/tests/phpunit/includes/hooks/ParserOutputHooksTest.php
@@ -17,7 +17,7 @@
use Wikibase\Client\ClientSiteLinkLookup;
use Wikibase\Client\Hooks\LanguageLinkBadgeDisplay;
use Wikibase\Client\Hooks\OtherProjectsSidebarGenerator;
-use Wikibase\Client\Hooks\ParserOutputHooks;
+use Wikibase\Client\Hooks\SidebarHookHandlers;
use Wikibase\DataModel\Entity\Item;
use Wikibase\DataModel\Entity\ItemId;
use Wikibase\DataModel\SiteLink;
@@ -29,7 +29,7 @@
use Wikibase\SettingsArray;
/**
- * @covers Wikibase\Client\Hooks\ParserOutputHooks
+ * @covers Wikibase\Client\Hooks\SidebarHookHandlers
*
* @group WikibaseClient
* @group Wikibase
@@ -38,7 +38,7 @@
* @licence GNU GPL v2+
* @author Daniel Kinzler
*/
-class ParserOutputHooksTest extends \MediaWikiTestCase {
+class SidebarHookHandlersTest extends \MediaWikiTestCase {
/**
* @param string $globalId
@@ -150,7 +150,7 @@
return new SettingsArray( array_merge( $defaults, $settings ) );
}
- private function newParserOutputHooks( array $settings = array() ) {
+ private function newSidebarHookHandlers( array $settings = array() ) {
$en = Language::factory( 'en' );
$settings = $this->newSettings( $settings );
@@ -202,7 +202,7 @@
$settings->getSetting( 'sortPrepend' )
);
- return new ParserOutputHooks(
+ return new SidebarHookHandlers(
$namespaceChecker,
$langLinkHandler,
$badgeDisplay,
@@ -304,7 +304,7 @@
array $expectedSisterLinks = null
) {
$parser = $this->newParser( $title, $pagePropsBefore, array() );
- $handler = $this->newParserOutputHooks();
+ $handler = $this->newSidebarHookHandlers();
$text = '';
$stripState = new StripState( 'x' );
@@ -330,7 +330,7 @@
'wikibase_item' => 'Q1',
);
- $handler = $this->newParserOutputHooks();
+ $handler = $this->newSidebarHookHandlers();
$pout = new ParserOutput();
--
To view, visit https://gerrit.wikimedia.org/r/159301
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I27c7e487d48f11a13a43b256c0790ec4c94c6563
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Daniel Kinzler <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits