| 1 | <?php |
| 2 | |
| 3 | namespace MediaWiki\Hook; |
| 4 | |
| 5 | use MediaWiki\SpecialPage\ContributionsSpecialPage; |
| 6 | use MediaWiki\User\User; |
| 7 | |
| 8 | /** |
| 9 | * This is a hook handler interface, see docs/Hooks.md. |
| 10 | * Use the hook name "SpecialContributionsBeforeMainOutput" to register handlers implementing this interface. |
| 11 | * |
| 12 | * This hook is run for any ContributionsSpecialPage, not just SpecialContributions. |
| 13 | * |
| 14 | * @stable to implement |
| 15 | * @ingroup Hooks |
| 16 | */ |
| 17 | interface SpecialContributionsBeforeMainOutputHook { |
| 18 | /** |
| 19 | * This hook is called before the form on Special:Contributions |
| 20 | * |
| 21 | * @since 1.35 |
| 22 | * |
| 23 | * @param int $id User id number, only provided for backwards-compatibility |
| 24 | * @param User $user User object representing user contributions are being fetched for |
| 25 | * @param ContributionsSpecialPage $sp SpecialPage instance, providing context |
| 26 | * @return bool|void True or no return value to continue or false to abort |
| 27 | */ |
| 28 | public function onSpecialContributionsBeforeMainOutput( $id, $user, $sp ); |
| 29 | } |