MediaWiki REL1_32
RevisionItemBase Class Reference

Abstract base class for revision items. More...

Inheritance diagram for RevisionItemBase:
Collaboration diagram for RevisionItemBase:

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

Protected Member Functions

 getLinkRenderer ()
 Returns an instance of LinkRenderer.
 

Protected Attributes

RevisionListBase $list
 The parent.
 
 $row
 The database result row.
 

Detailed Description

Abstract base class for revision items.

Definition at line 154 of file RevisionList.php.

Constructor & Destructor Documentation

◆ __construct()

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

Reimplemented in RevDelArchivedFileItem, RevDelFileItem, RevDelRevisionItem, and RevisionItem.

Definition at line 165 of file RevisionList.php.

References $list, $row, and list.

Member Function Documentation

◆ canView()

RevisionItemBase::canView ( )
abstract

Returns true if the current user can view the item.

Reimplemented in ChangeTagsLogItem, RevDelFileItem, RevDelLogItem, RevDelRevisionItem, and RevisionItem.

◆ canViewContent()

RevisionItemBase::canViewContent ( )
abstract

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

Reimplemented in ChangeTagsLogItem, RevDelFileItem, RevDelLogItem, RevDelRevisionItem, and RevisionItem.

◆ formatDate()

RevisionItemBase::formatDate ( )

Get the date, formatted in user's language.

Returns
string

Definition at line 229 of file RevisionList.php.

References getTimestamp(), and list.

◆ formatTime()

RevisionItemBase::formatTime ( )

Get the time, formatted in user's language.

Returns
string

Definition at line 238 of file RevisionList.php.

References getTimestamp(), and list.

◆ getAuthorActor()

RevisionItemBase::getAuthorActor ( )

Get the author actor ID.

Since
1.31
Returns
string

Definition at line 275 of file RevisionList.php.

References getAuthorActorField().

◆ getAuthorActorField()

RevisionItemBase::getAuthorActorField ( )

Get the DB field name storing actor ids.

Override this function.

Since
1.31
Returns
bool

Reimplemented in ChangeTagsLogItem, RevDelArchivedFileItem, RevDelArchiveItem, RevDelFileItem, RevDelLogItem, and RevDelRevisionItem.

Definition at line 212 of file RevisionList.php.

Referenced by getAuthorActor().

◆ getAuthorId()

RevisionItemBase::getAuthorId ( )

Get the author user ID.

Returns
int

Definition at line 256 of file RevisionList.php.

References getAuthorIdField().

◆ getAuthorIdField()

RevisionItemBase::getAuthorIdField ( )

Get the DB field name storing user ids.

Override this function.

Returns
bool

Reimplemented in ChangeTagsLogItem, RevDelArchivedFileItem, RevDelArchiveItem, RevDelFileItem, RevDelLogItem, RevDelRevisionItem, and RevisionItem.

Definition at line 193 of file RevisionList.php.

Referenced by getAuthorId().

◆ getAuthorName()

RevisionItemBase::getAuthorName ( )

Get the author user name.

Returns
string

Definition at line 265 of file RevisionList.php.

References getAuthorNameField().

◆ getAuthorNameField()

RevisionItemBase::getAuthorNameField ( )

Get the DB field name storing user names.

Override this function.

Returns
bool

Reimplemented in ChangeTagsLogItem, RevDelArchivedFileItem, RevDelArchiveItem, RevDelFileItem, RevDelLogItem, RevDelRevisionItem, and RevisionItem.

Definition at line 202 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 ChangeTagsLogItem, ChangeTagsRevisionItem, RevDelFileItem, RevDelLogItem, RevDelRevisionItem, and RevisionItem.

◆ getId()

RevisionItemBase::getId ( )

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

Returns
int

Reimplemented in RevDelArchivedFileItem, RevDelArchivedRevisionItem, RevDelArchiveItem, and RevDelFileItem.

Definition at line 220 of file RevisionList.php.

References getIdField().

Referenced by RevDelRevisionItem\isHideCurrentOp().

◆ getIdField()

RevisionItemBase::getIdField ( )

Get the DB field name associated with the ID list.

Override this function.

Returns
null

Reimplemented in ChangeTagsLogItem, RevDelArchivedFileItem, RevDelArchivedRevisionItem, RevDelArchiveItem, RevDelFileItem, RevDelLogItem, RevDelRevisionItem, and RevisionItem.

Definition at line 175 of file RevisionList.php.

Referenced by getId().

◆ getLinkRenderer()

◆ getTimestamp()

RevisionItemBase::getTimestamp ( )

Get the timestamp in MW 14-char form.

Returns
mixed

Definition at line 247 of file RevisionList.php.

References getTimestampField(), and wfTimestamp().

Referenced by formatDate(), and formatTime().

◆ getTimestampField()

RevisionItemBase::getTimestampField ( )

Get the DB field name storing timestamps.

Override this function.

Returns
bool

Reimplemented in ChangeTagsLogItem, RevDelArchivedFileItem, RevDelArchiveItem, RevDelFileItem, RevDelLogItem, RevDelRevisionItem, and RevisionItem.

Definition at line 184 of file RevisionList.php.

Referenced by getTimestamp().

Member Data Documentation

◆ $list

RevisionListBase RevisionItemBase::$list
protected

◆ $row


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