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