Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | n/a |
0 / 0 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
1 | <?php |
2 | namespace MediaWiki\Permissions\Hook; |
3 | |
4 | use MediaWiki\Linker\LinkTarget; |
5 | use MediaWiki\User\UserIdentity; |
6 | |
7 | /** |
8 | * This is a hook handler interface, see docs/Hooks.md |
9 | * Use the hook name "PermissionErrorAudit" to register handlers implementing this interface. |
10 | * |
11 | * @stable to implement |
12 | * @ingroup Hooks |
13 | */ |
14 | interface PermissionErrorAuditHook { |
15 | /** |
16 | * This hook is called from PermissionManager::getPermissionErrorsInternal() |
17 | * to collect internal permission errors and make them available to consumers. |
18 | * |
19 | * @param LinkTarget $title Page in question |
20 | * @param UserIdentity $user User to check |
21 | * @param string $action Action being checked |
22 | * @param string $rigor One of PermissionManager::RIGOR_ constants |
23 | * @param array[] $errors Array of arrays of the arguments to wfMessage to explain permissions problems. |
24 | * @return void This hook must not abort, it must return no value |
25 | * |
26 | * @since 1.39 |
27 | */ |
28 | public function onPermissionErrorAudit( |
29 | LinkTarget $title, |
30 | UserIdentity $user, |
31 | string $action, |
32 | string $rigor, |
33 | array $errors |
34 | ): void; |
35 | } |