diff options
Diffstat (limited to 'CheckUser/src/Hook/HookRunner.php')
-rw-r--r-- | CheckUser/src/Hook/HookRunner.php | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/CheckUser/src/Hook/HookRunner.php b/CheckUser/src/Hook/HookRunner.php new file mode 100644 index 00000000..d2e4327f --- /dev/null +++ b/CheckUser/src/Hook/HookRunner.php @@ -0,0 +1,42 @@ +<?php + +namespace MediaWiki\CheckUser\Hook; + +use IContextSource; +use MediaWiki\HookContainer\HookContainer; + +class HookRunner implements CheckUserFormatRowHook, CheckUserSubtitleLinksHook { + /** @var HookContainer */ + private $container; + + public function __construct( HookContainer $container ) { + $this->container = $container; + } + + /** + * @inheritDoc + */ + public function onCheckUserFormatRow( + IContextSource $context, + \stdClass $row, + array &$rowItems + ) { + $this->container->run( + 'CheckUserFormatRow', + [ $context, $row, &$rowItems ] + ); + } + + /** + * @inheritDoc + */ + public function onCheckUserSubtitleLinks( + IContextSource $context, + array &$links + ) { + $this->container->run( + 'CheckUserSubtitleLinks', + [ $context, &$links ] + ); + } +} |