MediaWiki master
|
A RevisionRecord representing a revision of a deleted page persisted in the archive table. More...
Inherits MediaWiki\Revision\RevisionRecord.
Public Member Functions | |
__construct (PageIdentity $page, UserIdentity $user, CommentStoreComment $comment, stdClass $row, RevisionSlots $slots, $wikiId=self::LOCAL) | |
audienceCan ( $field, $audience, ?Authority $performer=null) | |
Check that the given audience has access to the given field. | |
getArchiveId () | |
Get archive row ID. | |
getComment ( $audience=self::FOR_PUBLIC, ?Authority $performer=null) | |
getId ( $wikiId=self::LOCAL) | |
getPage () | |
Returns the page this revision belongs to. | |
getSha1 () | |
getSize () | |
getTimestamp () | |
getUser ( $audience=self::FOR_PUBLIC, ?Authority $performer=null) | |
isReadyForInsertion () | |
userCan ( $field, Authority $performer) | |
Determine if the give authority is allowed to view a particular field of this revision, if it's marked as deleted. | |
![]() | |
__construct (PageIdentity $page, RevisionSlots $slots, $wikiId=self::LOCAL) | |
getContent ( $role, $audience=self::FOR_PUBLIC, ?Authority $performer=null) | |
Returns the Content of the given slot of this revision. | |
getContentOrThrow ( $role, $audience=self::FOR_PUBLIC, ?Authority $performer=null) | |
Get the Content of the given slot of this revision. | |
getInheritedSlots () | |
Returns slots inherited from some previous revision. | |
getMainContentModel () | |
Returns the content model of the main slot of this revision. | |
getMainContentRaw () | |
Returns the Content of the main slot of this revision. | |
getOriginalSlots () | |
Returns the slots that originate in this revision. | |
getPageAsLinkTarget () | |
Returns the title of the page this revision is associated with as a LinkTarget object. | |
getPageId ( $wikiId=self::LOCAL) | |
Get the page ID. | |
getParentId ( $wikiId=self::LOCAL) | |
Get parent revision ID (the original previous page revision). | |
getPrimarySlots () | |
Returns primary slots (those that are not derived). | |
getSlot ( $role, $audience=self::FOR_PUBLIC, ?Authority $performer=null) | |
Returns meta-data for the given slot. | |
getSlotRoles () | |
Returns the slot names (roles) of all slots present in this revision. | |
getSlots () | |
Returns the slots defined for this revision. | |
getVisibility () | |
Get the deletion bitfield of the revision. | |
getWikiId () | |
Get the ID of the wiki this revision belongs to. | |
hasSameContent (RevisionRecord $rec) | |
hasSlot ( $role) | |
Returns whether the given slot is defined in this revision. | |
isCurrent () | |
Checks whether the revision record is a stored current revision. | |
isDeleted ( $field) | |
MCR migration note: this replaced Revision::isDeleted. | |
isMinor () | |
MCR migration note: this replaced Revision::isMinor. | |
![]() | |
assertWiki ( $wikiId) | |
Throws if $wikiId is different from the return value of getWikiId(). | |
Protected Attributes | |
int | $mArchiveId |
![]() | |
CommentStoreComment null | $mComment |
int | $mDeleted = 0 |
using the DELETED_XXX and SUPPRESSED_XXX flags | |
int null | $mId |
bool | $mMinorEdit = false |
PageIdentity | $mPage |
int | $mPageId |
int null | $mParentId |
string null | $mSha1 |
int null | $mSize |
RevisionSlots | $mSlots |
string null | $mTimestamp |
UserIdentity null | $mUser |
string false | $wikiId = false |
Wiki ID; false means the current wiki. | |
Additional Inherited Members | |
![]() | |
static | userCanBitfield ( $bitfield, $field, Authority $performer, ?PageIdentity $page=null) |
Determine if the current user is allowed to view a particular field of this revision, if it's marked as deleted. | |
![]() | |
const | DELETED_COMMENT = 2 |
const | DELETED_RESTRICTED = 8 |
const | DELETED_TEXT = 1 |
const | DELETED_USER = 4 |
const | FOR_PUBLIC = 1 |
const | FOR_THIS_USER = 2 |
const | RAW = 3 |
const | SUPPRESSED_ALL |
const | SUPPRESSED_USER = self::DELETED_USER | self::DELETED_RESTRICTED |
A RevisionRecord representing a revision of a deleted page persisted in the archive table.
Most getters on RevisionArchiveRecord will never return null. However, getId() and getParentId() may indeed return null if this information was not stored when the archive entry was created.
Definition at line 43 of file RevisionArchiveRecord.php.
MediaWiki\Revision\RevisionArchiveRecord::__construct | ( | PageIdentity | $page, |
UserIdentity | $user, | ||
CommentStoreComment | $comment, | ||
stdClass | $row, | ||
RevisionSlots | $slots, | ||
$wikiId = self::LOCAL ) |
PageIdentity | $page | The page this RevisionRecord is associated with. |
UserIdentity | $user | |
CommentStoreComment | $comment | |
stdClass | $row | An archive table row. Use RevisionStore::getArchiveQueryInfo() to build a query that yields the required fields. |
RevisionSlots | $slots | The slots of this revision. |
false | string | $wikiId | Relevant wiki or self::LOCAL for the current one. |
Definition at line 62 of file RevisionArchiveRecord.php.
References MediaWiki\Revision\RevisionRecord\$wikiId, and MediaWiki\Page\PageIdentity\canExist().
MediaWiki\Revision\RevisionArchiveRecord::audienceCan | ( | $field, | |
$audience, | |||
?Authority | $performer = null ) |
Check that the given audience has access to the given field.
MCR migration note: this corresponded to Revision::userCan
int | $field | One of self::DELETED_TEXT, self::DELETED_COMMENT, self::DELETED_USER |
int | $audience | One of: RevisionRecord::FOR_PUBLIC to be displayed to all users RevisionRecord::FOR_THIS_USER to be displayed to the given user RevisionRecord::RAW get the text regardless of permissions |
Authority | null | $performer | user on whose behalf to check |
Reimplemented from MediaWiki\Revision\RevisionRecord.
Definition at line 216 of file RevisionArchiveRecord.php.
MediaWiki\Revision\RevisionArchiveRecord::getArchiveId | ( | ) |
MediaWiki\Revision\RevisionArchiveRecord::getComment | ( | $audience = self::FOR_PUBLIC, | |
?Authority | $performer = null ) |
int | $audience | |
Authority | null | $performer |
Reimplemented from MediaWiki\Revision\RevisionRecord.
Definition at line 178 of file RevisionArchiveRecord.php.
MediaWiki\Revision\RevisionArchiveRecord::getId | ( | $wikiId = self::LOCAL | ) |
string | false | $wikiId | The wiki ID expected by the caller. |
Reimplemented from MediaWiki\Revision\RevisionRecord.
Definition at line 132 of file RevisionArchiveRecord.php.
MediaWiki\Revision\RevisionArchiveRecord::getPage | ( | ) |
Returns the page this revision belongs to.
Reimplemented from MediaWiki\Revision\RevisionRecord.
Definition at line 111 of file RevisionArchiveRecord.php.
MediaWiki\Revision\RevisionArchiveRecord::getSha1 | ( | ) |
RevisionAccessException | if the hash was unknown and could not be calculated. |
Reimplemented from MediaWiki\Revision\RevisionRecord.
Definition at line 153 of file RevisionArchiveRecord.php.
MediaWiki\Revision\RevisionArchiveRecord::getSize | ( | ) |
RevisionAccessException | if the size was unknown and could not be calculated. |
Reimplemented from MediaWiki\Revision\RevisionRecord.
Definition at line 141 of file RevisionArchiveRecord.php.
MediaWiki\Revision\RevisionArchiveRecord::getTimestamp | ( | ) |
Reimplemented from MediaWiki\Revision\RevisionRecord.
Definition at line 186 of file RevisionArchiveRecord.php.
MediaWiki\Revision\RevisionArchiveRecord::getUser | ( | $audience = self::FOR_PUBLIC, | |
?Authority | $performer = null ) |
int | $audience | |
Authority | null | $performer |
Reimplemented from MediaWiki\Revision\RevisionRecord.
Definition at line 167 of file RevisionArchiveRecord.php.
MediaWiki\Revision\RevisionArchiveRecord::isReadyForInsertion | ( | ) |
Reimplemented from MediaWiki\Revision\RevisionRecord.
Definition at line 237 of file RevisionArchiveRecord.php.
MediaWiki\Revision\RevisionArchiveRecord::userCan | ( | $field, | |
Authority | $performer ) |
Determine if the give authority is allowed to view a particular field of this revision, if it's marked as deleted.
MCR migration note: this corresponded to Revision::userCan
int | $field | One of self::DELETED_TEXT, self::DELETED_COMMENT, self::DELETED_USER |
Authority | $performer | user on whose behalf to check |
Reimplemented from MediaWiki\Revision\RevisionRecord.
Definition at line 191 of file RevisionArchiveRecord.php.
References MediaWiki\Permissions\Authority\authorizeRead().
|
protected |
Definition at line 48 of file RevisionArchiveRecord.php.