MediaWiki  1.23.0
RevisionItemBase Class Reference

Abstract base class for revision items. More...

Inheritance diagram for RevisionItemBase:

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...
 
 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...
 
 getAuthorIdField ()
 Get the DB field name storing user ids. More...
 
 getAuthorName ()
 Get the author user name. More...
 
 getAuthorNameField ()
 Get the DB field name storing user names. More...
 
 getHTML ()
 Get the HTML of the list item. More...
 
 getId ()
 Get the ID, as it would appear in the ids URL parameter. More...
 
 getIdField ()
 Get the DB field name associated with the ID list. More...
 
 getTimestamp ()
 Get the timestamp in MW 14-char form. More...
 
 getTimestampField ()
 Get the DB field name storing timestamps. More...
 

Public Attributes

 $list
 The parent RevisionListBase. More...
 
 $row
 The DB result row. More...
 

Detailed Description

Abstract base class for revision items.

Definition at line 130 of file RevisionList.php.

Constructor & Destructor Documentation

◆ __construct()

RevisionItemBase::__construct (   $list,
  $row 
)

Member Function Documentation

◆ canView()

RevisionItemBase::canView ( )
abstract

Returns true if the current user can view the item.

Reimplemented in RevDel_LogItem, RevDel_FileItem, RevisionItem, and RevDel_RevisionItem.

◆ canViewContent()

RevisionItemBase::canViewContent ( )
abstract

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

Reimplemented in RevDel_LogItem, RevDel_FileItem, RevisionItem, and RevDel_RevisionItem.

◆ formatDate()

RevisionItemBase::formatDate ( )

Get the date, formatted in user's language.

Returns
String

Definition at line 195 of file RevisionList.php.

References getTimestamp(), and list.

◆ formatTime()

RevisionItemBase::formatTime ( )

Get the time, formatted in user's language.

Returns
String

Definition at line 204 of file RevisionList.php.

References getTimestamp(), and list.

◆ getAuthorId()

RevisionItemBase::getAuthorId ( )

Get the author user ID.

Returns
int

Definition at line 222 of file RevisionList.php.

References getAuthorIdField().

◆ getAuthorIdField()

RevisionItemBase::getAuthorIdField ( )

Get the DB field name storing user ids.

Override this function.

Returns
bool

Reimplemented in RevDel_LogItem, RevDel_ArchivedFileItem, RevDel_FileItem, RevDel_ArchiveItem, RevisionItem, and RevDel_RevisionItem.

Definition at line 169 of file RevisionList.php.

Referenced by getAuthorId().

◆ getAuthorName()

RevisionItemBase::getAuthorName ( )

Get the author user name.

Returns
string

Definition at line 231 of file RevisionList.php.

References getAuthorNameField().

◆ getAuthorNameField()

RevisionItemBase::getAuthorNameField ( )

Get the DB field name storing user names.

Override this function.

Returns
bool

Reimplemented in RevDel_LogItem, RevDel_ArchivedFileItem, RevDel_FileItem, RevDel_ArchiveItem, RevisionItem, and RevDel_RevisionItem.

Definition at line 178 of file RevisionList.php.

Referenced by getAuthorName().

◆ getHTML()

RevisionItemBase::getHTML ( )
abstract

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 in RevDel_LogItem, RevDel_FileItem, RevisionItem, and RevDel_RevisionItem.

◆ getId()

RevisionItemBase::getId ( )

Get the ID, as it would appear in the ids URL parameter.

Returns

Reimplemented in RevDel_ArchivedFileItem, RevDel_FileItem, RevDel_ArchivedRevisionItem, and RevDel_ArchiveItem.

Definition at line 186 of file RevisionList.php.

References getIdField().

Referenced by RevDel_RevisionItem\isHideCurrentOp().

◆ getIdField()

RevisionItemBase::getIdField ( )

Get the DB field name associated with the ID list.

Override this function.

Returns
null

Reimplemented in RevDel_LogItem, RevDel_ArchivedFileItem, RevDel_FileItem, RevDel_ArchivedRevisionItem, RevDel_ArchiveItem, RevisionItem, and RevDel_RevisionItem.

Definition at line 151 of file RevisionList.php.

Referenced by getId().

◆ getTimestamp()

RevisionItemBase::getTimestamp ( )

Get the timestamp in MW 14-char form.

Returns
Mixed

Definition at line 213 of file RevisionList.php.

References getTimestampField(), TS_MW, and wfTimestamp().

Referenced by formatDate(), and formatTime().

◆ getTimestampField()

RevisionItemBase::getTimestampField ( )

Get the DB field name storing timestamps.

Override this function.

Returns
bool

Reimplemented in RevDel_LogItem, RevDel_ArchivedFileItem, RevDel_FileItem, RevDel_ArchiveItem, RevisionItem, and RevDel_RevisionItem.

Definition at line 160 of file RevisionList.php.

Referenced by getTimestamp().

Member Data Documentation

◆ $list

◆ $row


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