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