2020-11-29 22:20:32 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace MediaWiki\Extension\AbuseFilter\Hooks;
|
|
|
|
|
|
|
|
// phpcs:ignore MediaWiki.Classes.UnusedUseStatement.UnusedUse
|
2020-12-18 14:05:33 +00:00
|
|
|
use MediaWiki\Extension\AbuseFilter\Consequences\Consequence\Consequence;
|
2020-11-29 22:20:32 +00:00
|
|
|
// phpcs:ignore MediaWiki.Classes.UnusedUseStatement.UnusedUse
|
2020-12-18 14:05:33 +00:00
|
|
|
use MediaWiki\Extension\AbuseFilter\Consequences\Parameters;
|
2020-11-29 22:20:32 +00:00
|
|
|
|
|
|
|
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 );
|
|
|
|
}
|