MediaWiki  1.23.0
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. More...
 
 canViewContent ()
 Returns true if the current user can view the item text/file. More...
 
 getAuthorIdField ()
 Get the DB field name storing user ids. More...
 
 getAuthorNameField ()
 Get the DB field name storing user names. More...
 
 getHTML ()
 Get the HTML of the list item. More...
 
 getIdField ()
 Get the DB field name associated with the ID list. More...
 
 getTimestampField ()
 Get the DB field name storing timestamps. More...
 
 isDeleted ()
 
- Public Member Functions inherited from RevisionItemBase
 formatDate ()
 Get the date, formatted in user's language. More...
 
 formatTime ()
 Get the time, formatted in user's language. More...
 
 getAuthorId ()
 Get the author user ID. More...
 
 getAuthorName ()
 Get the author user name. More...
 
 getId ()
 Get the ID, as it would appear in the ids URL parameter. More...
 
 getTimestamp ()
 Get the timestamp in MW 14-char form. More...
 

Public Attributes

 $context
 
 $revision
 
- Public Attributes inherited from RevisionItemBase
 $list
 The parent RevisionListBase. More...
 
 $row
 The DB result row. More...
 

Protected Member Functions

 getDiffLink ()
 Get the HTML link to the diff. More...
 
 getRevisionLink ()
 Get the HTML link to the revision text. More...
 

Detailed Description

Item class for a live revision table row.

Definition at line 287 of file RevisionList.php.

Constructor & Destructor Documentation

◆ __construct()

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

Reimplemented from RevisionItemBase.

Definition at line 290 of file RevisionList.php.

References RevisionItemBase\$list, and RevisionItemBase\$row.

Member Function Documentation

◆ canView()

RevisionItem::canView ( )

Returns true if the current user can view the item.

Reimplemented from RevisionItemBase.

Definition at line 312 of file RevisionList.php.

References Revision\DELETED_RESTRICTED.

◆ canViewContent()

RevisionItem::canViewContent ( )

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

Reimplemented from RevisionItemBase.

Definition at line 316 of file RevisionList.php.

References Revision\DELETED_TEXT.

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 304 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 308 of file RevisionList.php.

◆ getDiffLink()

RevisionItem::getDiffLink ( )
protected

Get the HTML link to the diff.

Overridden by RevDel_ArchiveItem

Returns
string

Definition at line 350 of file RevisionList.php.

References array(), canViewContent(), isDeleted(), Linker\link(), and list.

Referenced by getHTML().

◆ getHTML()

RevisionItem::getHTML ( )

Get the HTML of the list item.

Should be include "<li></li>" tags. This is used to show the list in HTML form, by the special page.

Reimplemented from RevisionItemBase.

Definition at line 371 of file RevisionList.php.

References $comment, getDiffLink(), getRevisionLink(), isDeleted(), Linker\revComment(), 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 296 of file RevisionList.php.

◆ getRevisionLink()

RevisionItem::getRevisionLink ( )
protected

Get the HTML link to the revision text.

Overridden by RevDel_ArchiveItem.

Returns
string

Definition at line 329 of file RevisionList.php.

References array(), canViewContent(), isDeleted(), Linker\link(), list, and true.

Referenced by getHTML().

◆ getTimestampField()

RevisionItem::getTimestampField ( )

Get the DB field name storing timestamps.

Override this function.

Returns
bool

Reimplemented from RevisionItemBase.

Definition at line 300 of file RevisionList.php.

◆ isDeleted()

RevisionItem::isDeleted ( )

Definition at line 320 of file RevisionList.php.

References Revision\DELETED_TEXT.

Referenced by getDiffLink(), getHTML(), and getRevisionLink().

Member Data Documentation

◆ $context

RevisionItem::$context

Definition at line 288 of file RevisionList.php.

◆ $revision

RevisionItem::$revision

Definition at line 288 of file RevisionList.php.


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