Page MenuHomeWickedGov Phorge

HookRunner.php
No OneTemporary

Size
835 B
Referenced Files
None
Subscribers
None

HookRunner.php

<?php
namespace MediaWiki\Extension\CodeMirror\Hooks;
use MediaWiki\HookContainer\HookContainer;
use MediaWiki\SpecialPage\SpecialPage;
use MediaWiki\Title\Title;
/**
* This is a hook runner class, see docs/Hooks.md in core.
* @internal
*/
class HookRunner implements CodeMirrorGetModeHook, CodeMirrorSpecialPageHook {
public function __construct(
private readonly HookContainer $hookContainer,
) {
}
/**
* @inheritDoc
*/
public function onCodeMirrorGetMode( Title $title, ?string &$mode, string $model ): bool {
return $this->hookContainer->run( 'CodeMirrorGetMode', [ $title, &$mode, $model ] );
}
/**
* @inheritDoc
*/
public function onCodeMirrorSpecialPage( SpecialPage $special, array &$textareas ): bool {
return $this->hookContainer->run( 'CodeMirrorSpecialPage', [ $special, &$textareas ] );
}
}

File Metadata

Mime Type
text/x-php
Expires
Sat, May 16, 12:33 (16 h, 7 m)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
9d/db/2ff5c38412a67f64862072461d05
Default Alt Text
HookRunner.php (835 B)

Event Timeline