mediawiki-extensions-AbuseF.../includes/Hooks/AbuseFilterCustomActionsHook.php
Daimona Eaytoy 600f1735f2 Add a hook for extensions to add custom actions
The global is now deprecated, and it will be removed soon.

Bug: T265794
Change-Id: I4e6c9b143744cb72c441017921bac9cd1960609c
2020-12-04 16:10:44 +00:00

22 lines
785 B
PHP

<?php
namespace MediaWiki\Extension\AbuseFilter\Hooks;
// phpcs:ignore MediaWiki.Classes.UnusedUseStatement.UnusedUse
use MediaWiki\Extension\AbuseFilter\Consequence\Consequence;
// phpcs:ignore MediaWiki.Classes.UnusedUseStatement.UnusedUse
use MediaWiki\Extension\AbuseFilter\Consequence\Parameters;
interface AbuseFilterCustomActionsHook {
/**
* Hook runner for the `AbuseFilterCustomActions` hook
*
* Allows specifying custom actions. Callers should append to $actions, using the action name as (string) key,
* and the value should be a callable with the signature documented below.
*
* @param callable[] &$actions
* @phan-param array<string,callable(Parameters,array):Consequence> &$actions
*/
public function onAbuseFilterCustomActions( array &$actions );
}