| 1 | <?php |
| 2 | |
| 3 | namespace MediaWiki\Hook; |
| 4 | |
| 5 | use MediaWiki\SpecialPage\SpecialPage; |
| 6 | use MediaWiki\Title\Title; |
| 7 | |
| 8 | /** |
| 9 | * This is a hook handler interface, see docs/Hooks.md. |
| 10 | * Use the hook name "ContributionsToolLinks" to register handlers implementing this interface. |
| 11 | * |
| 12 | * @stable to implement |
| 13 | * @ingroup Hooks |
| 14 | */ |
| 15 | interface ContributionsToolLinksHook { |
| 16 | /** |
| 17 | * Use this hook to change the tool links above Special:Contributions. |
| 18 | * |
| 19 | * @since 1.35 |
| 20 | * |
| 21 | * @param int $id User identifier |
| 22 | * @param Title $title User page title |
| 23 | * @param string[] &$tools Array of tool links |
| 24 | * @param SpecialPage $specialPage SpecialPage instance for context and services. Can be either |
| 25 | * a ContributionsSpecialPage or DeletedContributionsPage. Extensions should type |
| 26 | * hint against a generic SpecialPage though. |
| 27 | * @return bool|void True or no return value to continue or false to abort |
| 28 | */ |
| 29 | public function onContributionsToolLinks( $id, Title $title, array &$tools, SpecialPage $specialPage ); |
| 30 | } |