| 1 | <?php |
| 2 | |
| 3 | namespace MediaWiki\Hook; |
| 4 | |
| 5 | use MediaWiki\Revision\RevisionRecord; |
| 6 | use MediaWiki\User\UserIdentity; |
| 7 | |
| 8 | /** |
| 9 | * This is a hook handler interface, see docs/Hooks.md. |
| 10 | * Use the hook name "HistoryTools" to register handlers implementing this interface. |
| 11 | * |
| 12 | * @stable to implement |
| 13 | * @ingroup Hooks |
| 14 | */ |
| 15 | interface HistoryToolsHook { |
| 16 | /** |
| 17 | * Use this hook to override or extend the revision tools available from the |
| 18 | * page history view, i.e. undo, rollback, etc. |
| 19 | * |
| 20 | * @since 1.35 |
| 21 | * |
| 22 | * @param RevisionRecord $revRecord |
| 23 | * @param string[] &$links Array of HTML links |
| 24 | * @param RevisionRecord|null $prevRevRecord RevisionRecord object, next in line |
| 25 | * in page history, or null |
| 26 | * @param UserIdentity $userIdentity Current user |
| 27 | * @return bool|void True or no return value to continue or false to abort |
| 28 | */ |
| 29 | public function onHistoryTools( $revRecord, &$links, $prevRevRecord, $userIdentity ); |
| 30 | } |