Wikibase
MediaWiki Wikibase extension
Wikibase\Repo\Diff\EntityContentDiffView Class Reference

Difference view for Wikibase entities. More...

+ Inheritance diagram for Wikibase\Repo\Diff\EntityContentDiffView:
+ Collaboration diagram for Wikibase\Repo\Diff\EntityContentDiffView:

Public Member Functions

 __construct ( $context=null, $old=0, $new=0, $rcid=0, $refreshCache=false, $unhide=false)
 
 getDiffLang ()
 
 getRevisionHeader ( $rev, $complete='')
 Get a header for a specified revision. More...
 
 generateContentDiffBody (Content $old, Content $new)
 

Protected Member Functions

 getParserOutput (WikiPage $page, RevisionRecord $rev)
 
 getDiffBodyCacheKeyParams ()
 

Private Attributes

 $diffVisualizer
 

Detailed Description

Difference view for Wikibase entities.

Author
Daniel Kinzler
Jeroen De Dauw < jeroe.nosp@m.nded.nosp@m.auw@g.nosp@m.mail.nosp@m..com >

Constructor & Destructor Documentation

◆ __construct()

Wikibase\Repo\Diff\EntityContentDiffView::__construct (   $context = null,
  $old = 0,
  $new = 0,
  $rcid = 0,
  $refreshCache = false,
  $unhide = false 
)
See also
DifferenceEngine::__construct
Parameters
IContextSource | null$context
int$old
int$new
int$rcid
bool$refreshCache
bool$unhide

Member Function Documentation

◆ generateContentDiffBody()

Wikibase\Repo\Diff\EntityContentDiffView::generateContentDiffBody ( Content  $old,
Content  $new 
)
See also
DifferenceEngine::generateContentDiffBody
Parameters
Content$old
Content$new
Exceptions
MWExceptionIf the two content objects are neither EntityContent nor TextContent.
Returns
string

◆ getDiffBodyCacheKeyParams()

Wikibase\Repo\Diff\EntityContentDiffView::getDiffBodyCacheKeyParams ( )
protected

◆ getDiffLang()

Wikibase\Repo\Diff\EntityContentDiffView::getDiffLang ( )
Returns
Language

◆ getParserOutput()

Wikibase\Repo\Diff\EntityContentDiffView::getParserOutput ( WikiPage  $page,
RevisionRecord  $rev 
)
protected
Parameters
WikiPage$page
RevisionRecord$rev
Returns
ParserOutput|bool False if the revision was not found

◆ getRevisionHeader()

Wikibase\Repo\Diff\EntityContentDiffView::getRevisionHeader (   $rev,
  $complete = '' 
)

Get a header for a specified revision.

Parameters
Revision | RevisionRecord$revPasing Revision is deprecated since 1.35
string$complete'complete' to get the header wrapped depending the visibility of the revision and a link to edit the page.
Returns
string HTML fragment

Member Data Documentation

◆ $diffVisualizer

Wikibase\Repo\Diff\EntityContentDiffView::$diffVisualizer
private

The documentation for this class was generated from the following file: