Extension:Echo/BeforeEchoEventInsert

From MediaWiki.org
Jump to navigation Jump to search
BeforeEchoEventInsert
Available from version ???
Before creating a new echo event
Define function:
public static function onBeforeEchoEventInsert( EchoEvent $event ) { ... }
Attach hook:

In extension.json:

{
	"Hooks": {
		"BeforeEchoEventInsert": "MyExtensionHooks::onBeforeEchoEventInsert"
	}
}

For MediaWiki ≤1.25:

$wgHooks['BeforeEchoEventInsert'][] = 'MyExtensionHooks::onBeforeEchoEventInsert';
Called from:File(s): Echo extension

For more information about attaching hooks, see Manual:Hooks.
For examples of extensions using this hook, see Category:BeforeEchoEventInsert extensions.

Details[edit]

  • $event: EchoEvent that will be created if the hook is not aborted

See also[edit]