mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/DiscussionTools
synced 2024-12-24 22:04:51 +00:00
32 lines
703 B
PHP
32 lines
703 B
PHP
|
<?php
|
||
|
|
||
|
namespace MediaWiki\Extension\DiscussionTools\Hooks;
|
||
|
|
||
|
use Config;
|
||
|
use MediaWiki\HookContainer\HookContainer;
|
||
|
use MessageLocalizer;
|
||
|
|
||
|
/**
|
||
|
* This is a hook runner class, see docs/Hooks.md in core.
|
||
|
* @internal
|
||
|
*/
|
||
|
class HookRunner implements
|
||
|
DiscussionToolsTermsOfUseMessagesHook
|
||
|
{
|
||
|
private HookContainer $hookContainer;
|
||
|
|
||
|
public function __construct( HookContainer $hookContainer ) {
|
||
|
$this->hookContainer = $hookContainer;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* @inheritDoc
|
||
|
*/
|
||
|
public function onDiscussionToolsTermsOfUseMessages( array &$messages, MessageLocalizer $context, Config $config ) {
|
||
|
return $this->hookContainer->run(
|
||
|
'DiscussionToolsTermsOfUseMessages',
|
||
|
[ &$messages, $context, $config ]
|
||
|
);
|
||
|
}
|
||
|
}
|