diff --git a/includes/Hooks.php b/includes/Hooks.php index 7a7b473b0..714fda1d9 100644 --- a/includes/Hooks.php +++ b/includes/Hooks.php @@ -29,6 +29,7 @@ use MediaWiki\Hook\FetchChangesListHook; use MediaWiki\Hook\OutputPageBodyAttributesHook; use MediaWiki\Hook\UserLogoutCompleteHook; use MediaWiki\MediaWikiServices; +use MediaWiki\Minerva\Hooks\HookRunner; use MediaWiki\Minerva\Skins\SkinMinerva; use MediaWiki\Minerva\Skins\SkinUserPageHelper; use MediaWiki\ResourceLoader\Context; @@ -320,7 +321,7 @@ class Hooks implements ), SkinOptions::TABS_ON_SPECIALS => true, ] ); - $services->getHookContainer()->run( 'SkinMinervaOptionsInit', [ $skin, $skinOptions ] ); + ( new HookRunner( $services->getHookContainer() ) )->onSkinMinervaOptionsInit( $skin, $skinOptions ); } } diff --git a/includes/Hooks/HookRunner.php b/includes/Hooks/HookRunner.php new file mode 100644 index 000000000..4e7a8101b --- /dev/null +++ b/includes/Hooks/HookRunner.php @@ -0,0 +1,31 @@ +hookContainer = $hookContainer; + } + + /** + * @inheritDoc + */ + public function onSkinMinervaOptionsInit( Skin $skin, SkinOptions $skinOptions ) { + return $this->hookContainer->run( + 'SkinMinervaOptionsInit', + [ $skin, $skinOptions ] + ); + } +} diff --git a/includes/Hooks/SkinMinervaOptionsInitHook.php b/includes/Hooks/SkinMinervaOptionsInitHook.php new file mode 100644 index 000000000..9d4f7e9e0 --- /dev/null +++ b/includes/Hooks/SkinMinervaOptionsInitHook.php @@ -0,0 +1,22 @@ +