MediaWiki REL1_32
RevisionItem Class Reference

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

Inheritance diagram for RevisionItem:
Collaboration diagram for RevisionItem:

Public Member Functions

 __construct ( $list, $row)
 
 canView ()
 Returns true if the current user can view the item.
 
 canViewContent ()
 Returns true if the current user can view the item text/file.
 
 getAuthorIdField ()
 Get the DB field name storing user ids.
 
 getAuthorNameField ()
 Get the DB field name storing user names.
 
 getHTML ()
 
 getIdField ()
 Get the DB field name associated with the ID list.
 
 getTimestampField ()
 Get the DB field name storing timestamps.
 
 isDeleted ()
 
- Public Member Functions inherited from 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.
 
- Protected Member Functions inherited from RevisionItemBase
 getLinkRenderer ()
 Returns an instance of LinkRenderer.
 

Protected Attributes

RequestContext $context
 
Revision $revision
 
- Protected Attributes inherited from RevisionItemBase
RevisionListBase $list
 The parent.
 
 $row
 The database result row.
 

Detailed Description

Item class for a live revision table row.

Definition at line 338 of file RevisionList.php.

Constructor & Destructor Documentation

◆ __construct()

RevisionItem::__construct (   $list,
  $row 
)
Parameters
RevisionListBase$list
object$rowDB result row

Reimplemented from RevisionItemBase.

Definition at line 345 of file RevisionList.php.

References RevisionItemBase\$list, RevisionItemBase\$row, ContextSource\getContext(), and revision.

Member Function Documentation

◆ canView()

RevisionItem::canView ( )

Returns true if the current user can view the item.

Reimplemented from RevisionItemBase.

Definition at line 367 of file RevisionList.php.

References Revision\DELETED_RESTRICTED, and revision.

◆ canViewContent()

RevisionItem::canViewContent ( )

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

Reimplemented from RevisionItemBase.

Definition at line 371 of file RevisionList.php.

References Revision\DELETED_TEXT, and revision.

Referenced by getDiffLink(), and getRevisionLink().

◆ getAuthorIdField()

RevisionItem::getAuthorIdField ( )

Get the DB field name storing user ids.

Override this function.

Returns
bool

Reimplemented from RevisionItemBase.

Definition at line 359 of file RevisionList.php.

◆ getAuthorNameField()

RevisionItem::getAuthorNameField ( )

Get the DB field name storing user names.

Override this function.

Returns
bool

Reimplemented from RevisionItemBase.

Definition at line 363 of file RevisionList.php.

◆ getDiffLink()

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

Definition at line 412 of file RevisionList.php.

References $linkRenderer, canViewContent(), RevisionItemBase\getLinkRenderer(), isDeleted(), and list.

Referenced by ChangeTagsRevisionItem\getHTML(), and getHTML().

◆ getHTML()

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

Reimplemented from RevisionItemBase.

Reimplemented in ChangeTagsRevisionItem.

Definition at line 436 of file RevisionList.php.

References getDiffLink(), getRevisionLink(), isDeleted(), Linker\revComment(), revision, and Linker\revUserLink().

◆ getIdField()

RevisionItem::getIdField ( )

Get the DB field name associated with the ID list.

Override this function.

Returns
null

Reimplemented from RevisionItemBase.

Definition at line 351 of file RevisionList.php.

◆ getRevisionLink()

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

Definition at line 386 of file RevisionList.php.

References $linkRenderer, canViewContent(), RevisionItemBase\getLinkRenderer(), isDeleted(), list, and revision.

Referenced by ChangeTagsRevisionItem\getHTML(), and getHTML().

◆ getTimestampField()

RevisionItem::getTimestampField ( )

Get the DB field name storing timestamps.

Override this function.

Returns
bool

Reimplemented from RevisionItemBase.

Definition at line 355 of file RevisionList.php.

◆ isDeleted()

RevisionItem::isDeleted ( )

Member Data Documentation

◆ $context

RequestContext RevisionItem::$context
protected

Definition at line 343 of file RevisionList.php.

◆ $revision

Revision RevisionItem::$revision
protected

Definition at line 340 of file RevisionList.php.


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