MediaWiki master
MediaWiki\RevisionList\RevisionItem Class Reference

Item class for a live revision table row. More...

Inherits MediaWiki\RevisionList\RevisionItemBase.

Inherited by ChangeTagsRevisionItem.

Collaboration diagram for MediaWiki\RevisionList\RevisionItem:

Public Member Functions

 __construct (RevisionListBase $list, $row)
 
Parameters
RevisionListBase$list
stdClass$rowDB result row

 
 canView ()
 Returns true if the current user can view the item.
Returns
bool

 
 canViewContent ()
 Returns true if the current user can view the item text/file.
Returns
bool

 
 getAuthorIdField ()
 Get the DB field name storing user ids.Override this function.

Returns
string|false

 
 getAuthorNameField ()
 Get the DB field name storing user names.Override this function.

Returns
string|false

 
 getHTML ()
 
 getIdField ()
 Get the DB field name associated with the ID list.Override this function.

Returns
string|null

 
 getTimestampField ()
 Get the DB field name storing timestamps.Override this function.

Returns
string|false

 
 isDeleted ()
 
- Public Member Functions inherited from MediaWiki\RevisionList\RevisionItemBase
 formatDate ()
 Get the date, formatted in user's language.
 
 formatTime ()
 Get the time, formatted in user's language.
 
 getAuthorActor ()
 Get the author actor ID.
 
 getAuthorActorField ()
 Get the DB field name storing actor ids.
 
 getAuthorId ()
 Get the author user ID.
 
 getAuthorName ()
 Get the author user name.
 
 getId ()
 Get the ID, as it would appear in the ids URL parameter.
 
 getTimestamp ()
 Get the timestamp in MW 14-char form.
 

Protected Member Functions

 getDiffLink ()
 Get the HTML link to the diff.
 
 getRevisionLink ()
 Get the HTML link to the revision text.
 
 getRevisionRecord ()
 Get the RevisionRecord for the item.
 
- Protected Member Functions inherited from MediaWiki\RevisionList\RevisionItemBase
 getLinkRenderer ()
 Returns an instance of LinkRenderer.
 

Protected Attributes

RequestContext $context
 
RevisionRecord $revisionRecord
 
- Protected Attributes inherited from MediaWiki\RevisionList\RevisionItemBase
RevisionListBase $list
 The parent.
 
stdClass $row
 The database result row.
 

Detailed Description

Item class for a live revision table row.

Definition at line 33 of file RevisionItem.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\RevisionList\RevisionItem::__construct ( RevisionListBase $list,
$row )

Member Function Documentation

◆ canView()

MediaWiki\RevisionList\RevisionItem::canView ( )

Returns true if the current user can view the item.

Returns
bool

Reimplemented from MediaWiki\RevisionList\RevisionItemBase.

Definition at line 79 of file RevisionItem.php.

◆ canViewContent()

MediaWiki\RevisionList\RevisionItem::canViewContent ( )

Returns true if the current user can view the item text/file.

Returns
bool

Reimplemented from MediaWiki\RevisionList\RevisionItemBase.

Definition at line 87 of file RevisionItem.php.

◆ getAuthorIdField()

MediaWiki\RevisionList\RevisionItem::getAuthorIdField ( )

Get the DB field name storing user ids.Override this function.

Returns
string|false

Reimplemented from MediaWiki\RevisionList\RevisionItemBase.

Definition at line 69 of file RevisionItem.php.

◆ getAuthorNameField()

MediaWiki\RevisionList\RevisionItem::getAuthorNameField ( )

Get the DB field name storing user names.Override this function.

Returns
string|false

Reimplemented from MediaWiki\RevisionList\RevisionItemBase.

Definition at line 74 of file RevisionItem.php.

◆ getDiffLink()

MediaWiki\RevisionList\RevisionItem::getDiffLink ( )
protected

Get the HTML link to the diff.

Todo
Essentially a copy of RevDelRevisionItem::getDiffLink. That class should inherit from this one, and implement an appropriate interface instead of extending RevDelItem
Returns
string HTML

Definition at line 135 of file RevisionItem.php.

Referenced by ChangeTagsRevisionItem\getHTML().

◆ getHTML()

MediaWiki\RevisionList\RevisionItem::getHTML ( )
Todo
Essentially a copy of RevDelRevisionItem::getHTML. That class should inherit from this one, and implement an appropriate interface instead of extending RevDelItem
Returns
string HTML

Reimplemented from MediaWiki\RevisionList\RevisionItemBase.

Reimplemented in ChangeTagsRevisionItem.

Definition at line 159 of file RevisionItem.php.

References MediaWiki\MediaWikiServices\getInstance().

◆ getIdField()

MediaWiki\RevisionList\RevisionItem::getIdField ( )

Get the DB field name associated with the ID list.Override this function.

Returns
string|null

Reimplemented from MediaWiki\RevisionList\RevisionItemBase.

Definition at line 59 of file RevisionItem.php.

◆ getRevisionLink()

MediaWiki\RevisionList\RevisionItem::getRevisionLink ( )
protected

Get the HTML link to the revision text.

Todo
Essentially a copy of RevDelRevisionItem::getRevisionLink. That class should inherit from this one, and implement an appropriate interface instead of extending RevDelItem
Returns
string HTML

Definition at line 108 of file RevisionItem.php.

Referenced by ChangeTagsRevisionItem\getHTML().

◆ getRevisionRecord()

MediaWiki\RevisionList\RevisionItem::getRevisionRecord ( )
protected

Get the RevisionRecord for the item.

Returns
RevisionRecord

Definition at line 54 of file RevisionItem.php.

Referenced by ChangeTagsRevisionItem\getHTML().

◆ getTimestampField()

MediaWiki\RevisionList\RevisionItem::getTimestampField ( )

Get the DB field name storing timestamps.Override this function.

Returns
string|false

Reimplemented from MediaWiki\RevisionList\RevisionItemBase.

Definition at line 64 of file RevisionItem.php.

◆ isDeleted()

MediaWiki\RevisionList\RevisionItem::isDeleted ( )
Returns
bool

Definition at line 97 of file RevisionItem.php.

Referenced by ChangeTagsRevisionItem\getHTML().

Member Data Documentation

◆ $context

RequestContext MediaWiki\RevisionList\RevisionItem::$context
protected

Definition at line 38 of file RevisionItem.php.

◆ $revisionRecord

RevisionRecord MediaWiki\RevisionList\RevisionItem::$revisionRecord
protected

Definition at line 35 of file RevisionItem.php.


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