MediaWiki  1.27.2
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. 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...
 

Protected Attributes

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

Detailed Description

Abstract base class for revision items.

Definition at line 138 of file RevisionList.php.

Constructor & Destructor Documentation

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

Definition at line 149 of file RevisionList.php.

References $list, $row, list, and row().

Referenced by RevDelArchivedFileItem\__construct(), RevDelArchiveItem\__construct(), and RevDelArchivedRevisionItem\__construct().

Member Function Documentation

RevisionItemBase::canView ( )
abstract

Returns true if the current user can view the item.

RevisionItemBase::canViewContent ( )
abstract

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

RevisionItemBase::formatDate ( )

Get the date, formatted in user's language.

Returns
string

Definition at line 203 of file RevisionList.php.

References getTimestamp(), and list.

RevisionItemBase::formatTime ( )

Get the time, formatted in user's language.

Returns
string

Definition at line 212 of file RevisionList.php.

References getTimestamp(), and list.

RevisionItemBase::getAuthorId ( )

Get the author user ID.

Returns
int

Definition at line 230 of file RevisionList.php.

References getAuthorIdField(), and row().

RevisionItemBase::getAuthorIdField ( )

Get the DB field name storing user ids.

Override this function.

Returns
bool

Definition at line 177 of file RevisionList.php.

Referenced by getAuthorId().

RevisionItemBase::getAuthorName ( )

Get the author user name.

Returns
string

Definition at line 239 of file RevisionList.php.

References getAuthorNameField(), and row().

RevisionItemBase::getAuthorNameField ( )

Get the DB field name storing user names.

Override this function.

Returns
bool

Definition at line 186 of file RevisionList.php.

Referenced by getAuthorName().

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.

RevisionItemBase::getId ( )

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

Returns
int

Definition at line 194 of file RevisionList.php.

References getIdField(), and row().

Referenced by RevDelRevisionItem\isHideCurrentOp().

RevisionItemBase::getIdField ( )

Get the DB field name associated with the ID list.

Override this function.

Returns
null

Definition at line 159 of file RevisionList.php.

Referenced by getId().

RevisionItemBase::getTimestamp ( )

Get the timestamp in MW 14-char form.

Returns
mixed

Definition at line 221 of file RevisionList.php.

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

Referenced by formatDate(), and formatTime().

RevisionItemBase::getTimestampField ( )

Get the DB field name storing timestamps.

Override this function.

Returns
bool

Definition at line 168 of file RevisionList.php.

Referenced by getTimestamp().

Member Data Documentation


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