User:Tgr (WMF)/DifferenceEngine/entry points

ContentHandler::createDifferenceEngine
Callers / calls:
 * Article::showDiffPage (diff view)
 * mNewid (get)
 * showDiffPage
 * mapDiffPrevNext
 * EditPage::showDiff (edit diff when previewing changes)
 * setContent
 * getDiff
 * showDiffStyle
 * ApiQueryRevisionsBase (diffto/difftotext parameters, deprecated)
 * setContent
 * getOldid / getNewid
 * getDiffBody
 * wasCacheHit
 * FeedUtils::formatDiffRow (RC RSS feed)
 * getDiff
 * RollbackAction:onView (diff after successful rollback)
 * showDiff
 * SpecialComparePages::showDiff (???)
 * showDiffPage
 * SpecialUndelete::showDiff (act like history page but with deleted revisions included)
 * showDiffStyle
 * generateContentDiffBody
 * addHeader
 * TextConflictHelper::showEditFormTextAfterFooters (diff on edit conflict)
 * setContent
 * showDiff
 * MobileFrontend SpecialMobileDiff::displayDiffPage (mobile diff view)
 * showDiffPage

GetDifferenceEngine

 * (Called when getting a new difference engine interface object Return false for valid object in $differenceEngine or true for the default difference engine.)

Handlers / overrides:
 * WikEdDiff:
 * generateTextDiffBody

DifferenceEngineAfterLoadNewText

 * (called in DifferenceEngine::loadNewText after the new revision's content has been loaded into the class member variable $differenceEngine->mNewContent but before returning true from this function.)

(no handlers in gerrit)

DifferenceEngineLoadTextAfterNewContentIsLoaded

 * (called in DifferenceEngine::loadText after the new revision's content has been loaded into the class member variable $differenceEngine->mNewContent but before checking if the variable's value is null. This hook can be used to inject content into said class member variable.)

(no handlers in gerrit)

DifferenceEngineMarkPatrolledLink

 * (Allows extensions to change the "mark as patrolled" link which is shown both on the diff header as well as on the bottom of a page, usually wrapped in a span element which has class="patrollink".)

(no handlers in gerrit)

DifferenceEngineMarkPatrolledRCID

 * (Allows extensions to possibly change the rcid parameter. For example the rcid might be set to zero due to the user being the same as the performer of the change but an extension might still want to show it under certain conditions.)

(no handlers in gerrit)

DifferenceEngineNewHeader

 * (Allows extensions to change the $newHeader variable, which contains information about the new revision, such as the revision's author, whether the revision was marked as a minor edit or not, etc.)

Handlers / calls:
 * SocialProfile
 * mOldRev (get)

DifferenceEngineOldHeader

 * (Allows extensions to change the $oldHeader variable, which contains information about the old revision, such as the revision's author, whether the revision was marked as a minor edit or not, etc.)

Handlers / calls:
 * SocialProfile
 * getRevisionHeader
 * mNewRev (get)
 * markPatrolledLink

DifferenceEngineRenderRevisionAddParserOutput

 * (Allows extensions to change the parser output. Return false to not add parser output via OutputPage's addParserOutput method.)

(no handlers in gerrit)

DifferenceEngineShowDiff

 * (Allows extensions to affect the diff text which eventually gets sent to the OutputPage object.)

Handlers / calls:
 * SocialProfile
 * getOutput (adds extra styles)

DifferenceEngineShowEmptyOldContent

 * (Allows extensions to change the diff table body (without header) in cases when there is no old revision or the old and new revisions are identical.)

(no handlers in gerrit)

DifferenceEngineShowDiffPageMaybeShowMissingRevision

 * (called in DifferenceEngine::showDiffPage when revision data cannot be loaded. Return false in order to prevent displaying the missing revision message (i.e. to prevent DifferenceEngine::showMissingRevision from being called).)

(no handlers in gerrit)

AbortDiffCache

 * ''(Can be used to cancel the caching of a diff.)

(no handlers in gerrit)

DiffViewHeader

 * (Called before diff display)

Handlers / calls:
 * FlaggedRevs
 * getOutput (adds extra scripts/styles)
 * getTitle
 * MobileFrontend
 * getContext
 * RevisionSlider
 * getTitle
 * getUser
 * SpamDiffTool
 * getTitle
 * Thanks
 * getUser
 * VisualEditor
 * getTitle

ArticleContentOnDiff

 * (Before showing the article content below a diff. Use this to change the content in this area or how it is loaded.)

Handlers / calls:
 * Translate
 * getTitle
 * loadNewText
 * mNewContent (get)
 * TimedMediaHandler (not used)

NewDifferenceEngine

 * (Called when a new DifferenceEngine object is made)
 * Exposes ,

Handlers / changes:
 * FlaggedRevs
 * handles special URL parameter value 'diff=review': sets oldid to stable ID, newid to 0