MediaWiki master
|
Abstract base class for revision items. More...
Inherited by ChangeTagsLogItem, MediaWiki\RevisionList\RevisionItem, and RevDelItem.
Public Member Functions | |
__construct (RevisionListBase $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. | |
stdClass | $row |
The database result row. | |
Abstract base class for revision items.
Definition at line 32 of file RevisionItemBase.php.
MediaWiki\RevisionList\RevisionItemBase::__construct | ( | RevisionListBase | $list, |
$row ) |
RevisionListBase | $list | |
stdClass | $row | DB result row |
Reimplemented in RevDelArchivedFileItem, RevDelFileItem, RevDelRevisionItem, and MediaWiki\RevisionList\RevisionItem.
Definition at line 43 of file RevisionItemBase.php.
References MediaWiki\RevisionList\RevisionItemBase\$list, and MediaWiki\RevisionList\RevisionItemBase\$row.
|
abstract |
Returns true if the current user can view the item.
Reimplemented in ChangeTagsLogItem, RevDelFileItem, RevDelLogItem, RevDelRevisionItem, and MediaWiki\RevisionList\RevisionItem.
|
abstract |
Returns true if the current user can view the item text/file.
Reimplemented in ChangeTagsLogItem, RevDelFileItem, RevDelLogItem, RevDelRevisionItem, and MediaWiki\RevisionList\RevisionItem.
MediaWiki\RevisionList\RevisionItemBase::formatDate | ( | ) |
Get the date, formatted in user's language.
Definition at line 107 of file RevisionItemBase.php.
References MediaWiki\RevisionList\RevisionItemBase\getTimestamp().
MediaWiki\RevisionList\RevisionItemBase::formatTime | ( | ) |
Get the time, formatted in user's language.
Definition at line 116 of file RevisionItemBase.php.
References MediaWiki\RevisionList\RevisionItemBase\getTimestamp().
MediaWiki\RevisionList\RevisionItemBase::getAuthorActor | ( | ) |
Get the author actor ID.
Definition at line 153 of file RevisionItemBase.php.
References MediaWiki\RevisionList\RevisionItemBase\getAuthorActorField().
MediaWiki\RevisionList\RevisionItemBase::getAuthorActorField | ( | ) |
Get the DB field name storing actor ids.
Override this function.
Reimplemented in ChangeTagsLogItem, RevDelArchivedFileItem, RevDelArchiveItem, RevDelFileItem, RevDelLogItem, and RevDelRevisionItem.
Definition at line 90 of file RevisionItemBase.php.
Referenced by MediaWiki\RevisionList\RevisionItemBase\getAuthorActor().
MediaWiki\RevisionList\RevisionItemBase::getAuthorId | ( | ) |
Get the author user ID.
Definition at line 134 of file RevisionItemBase.php.
References MediaWiki\RevisionList\RevisionItemBase\getAuthorIdField().
MediaWiki\RevisionList\RevisionItemBase::getAuthorIdField | ( | ) |
Get the DB field name storing user ids.
Override this function.
Reimplemented in ChangeTagsLogItem, RevDelArchivedFileItem, RevDelArchiveItem, RevDelFileItem, RevDelLogItem, RevDelRevisionItem, and MediaWiki\RevisionList\RevisionItem.
Definition at line 71 of file RevisionItemBase.php.
Referenced by MediaWiki\RevisionList\RevisionItemBase\getAuthorId().
MediaWiki\RevisionList\RevisionItemBase::getAuthorName | ( | ) |
Get the author user name.
Definition at line 143 of file RevisionItemBase.php.
References MediaWiki\RevisionList\RevisionItemBase\getAuthorNameField().
MediaWiki\RevisionList\RevisionItemBase::getAuthorNameField | ( | ) |
Get the DB field name storing user names.
Override this function.
Reimplemented in ChangeTagsLogItem, RevDelArchivedFileItem, RevDelArchiveItem, RevDelFileItem, RevDelLogItem, RevDelRevisionItem, and MediaWiki\RevisionList\RevisionItem.
Definition at line 80 of file RevisionItemBase.php.
Referenced by MediaWiki\RevisionList\RevisionItemBase\getAuthorName().
|
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 MediaWiki\RevisionList\RevisionItem.
MediaWiki\RevisionList\RevisionItemBase::getId | ( | ) |
Get the ID, as it would appear in the ids URL parameter.
Reimplemented in RevDelArchivedFileItem, RevDelArchivedRevisionItem, RevDelArchiveItem, and RevDelFileItem.
Definition at line 98 of file RevisionItemBase.php.
References MediaWiki\RevisionList\RevisionItemBase\getIdField().
MediaWiki\RevisionList\RevisionItemBase::getIdField | ( | ) |
Get the DB field name associated with the ID list.
Override this function.
Reimplemented in ChangeTagsLogItem, RevDelArchivedFileItem, RevDelArchivedRevisionItem, RevDelArchiveItem, RevDelFileItem, RevDelLogItem, RevDelRevisionItem, and MediaWiki\RevisionList\RevisionItem.
Definition at line 53 of file RevisionItemBase.php.
Referenced by MediaWiki\RevisionList\RevisionItemBase\getId().
|
protected |
Returns an instance of LinkRenderer.
Definition at line 181 of file RevisionItemBase.php.
References MediaWiki\MediaWikiServices\getInstance().
Referenced by RevDelArchiveItem\getDiffLink(), RevDelLogItem\getHTML(), RevDelArchivedFileItem\getLink(), RevDelFileItem\getLink(), and RevDelArchiveItem\getRevisionLink().
MediaWiki\RevisionList\RevisionItemBase::getTimestamp | ( | ) |
Get the timestamp in MW 14-char form.
Definition at line 125 of file RevisionItemBase.php.
References MediaWiki\RevisionList\RevisionItemBase\getTimestampField(), and wfTimestamp().
Referenced by MediaWiki\RevisionList\RevisionItemBase\formatDate(), and MediaWiki\RevisionList\RevisionItemBase\formatTime().
MediaWiki\RevisionList\RevisionItemBase::getTimestampField | ( | ) |
Get the DB field name storing timestamps.
Override this function.
Reimplemented in ChangeTagsLogItem, RevDelArchivedFileItem, RevDelArchiveItem, RevDelFileItem, RevDelLogItem, RevDelRevisionItem, and MediaWiki\RevisionList\RevisionItem.
Definition at line 62 of file RevisionItemBase.php.
Referenced by MediaWiki\RevisionList\RevisionItemBase\getTimestamp().
|
protected |
The parent.
Definition at line 34 of file RevisionItemBase.php.
Referenced by RevDelRevisionItem\__construct(), MediaWiki\RevisionList\RevisionItem\__construct(), MediaWiki\RevisionList\RevisionItemBase\__construct(), RevDelLogItem\__construct(), RevDelArchivedRevisionItem\__construct(), and RevDelArchiveItem\initRevisionRecord().
|
protected |
The database result row.
Definition at line 37 of file RevisionItemBase.php.
Referenced by RevDelArchivedFileItem\__construct(), RevDelFileItem\__construct(), RevDelRevisionItem\__construct(), MediaWiki\RevisionList\RevisionItem\__construct(), MediaWiki\RevisionList\RevisionItemBase\__construct(), RevDelLogItem\__construct(), RevDelArchivedRevisionItem\__construct(), RevDelArchivedFileItem\initFile(), RevDelFileItem\initFile(), RevDelArchiveItem\initRevisionRecord(), and RevDelRevisionItem\initRevisionRecord().