Builder class for the EditResult object.
More...
|
| | __construct (RevisionStore $revisionStore, array $softwareTags) |
| | EditResultBuilder constructor.
|
| |
| | buildEditResult () |
| | Builds the EditResult object.
|
| |
| | markAsRevert (int $revertMethod, int $oldestRevertedRevId, int $newestRevertedRevId=0) |
| | Marks this edit as a revert and applies relevant information.
|
| |
| | setIsNew (bool $isNew) |
| | Set whether the edit created a new page.
|
| |
| | setOriginalRevisionId ( $originalRevId) |
| | Sets the ID of an earlier revision that is being repeated or restored.
|
| |
| | setRevisionRecord (RevisionRecord $revisionRecord) |
| | Set the revision associated with this edit.
|
| |
|
| | getOriginalRevision (int $flags=RevisionStore::READ_NORMAL) |
| | Returns the revision that is being repeated or restored.
|
| |
| | getRevertTags () |
| | Returns an array of revert-related tags that will be applied automatically to this edit.
|
| |
| | isExactRevert () |
| | Whether the edit was an exact revert, i.e.
|
| |
| | isNullEdit () |
| | An edit is a null edit if the original revision is equal to the parent revision.
|
| |
Builder class for the EditResult object.
Definition at line 36 of file EditResultBuilder.php.
◆ __construct()
| MediaWiki\Storage\EditResultBuilder::__construct |
( |
RevisionStore |
$revisionStore, |
|
|
array |
$softwareTags |
|
) |
| |
◆ buildEditResult()
| MediaWiki\Storage\EditResultBuilder::buildEditResult |
( |
| ) |
|
◆ getOriginalRevision()
| MediaWiki\Storage\EditResultBuilder::getOriginalRevision |
( |
int |
$flags = RevisionStore::READ_NORMAL | ) |
|
|
private |
Returns the revision that is being repeated or restored.
Returns null if not set for this edit.
- Parameters
-
| int | $flags | Access flags, e.g. RevisionStore::READ_LATEST |
- Returns
- RevisionRecord|null
Definition at line 165 of file EditResultBuilder.php.
◆ getRevertTags()
| MediaWiki\Storage\EditResultBuilder::getRevertTags |
( |
| ) |
|
|
private |
Returns an array of revert-related tags that will be applied automatically to this edit.
- Returns
- string[]
Definition at line 220 of file EditResultBuilder.php.
◆ isExactRevert()
| MediaWiki\Storage\EditResultBuilder::isExactRevert |
( |
| ) |
|
|
private |
Whether the edit was an exact revert, i.e.
the contents of the revert revision and restored revision match
- Returns
- bool
Definition at line 188 of file EditResultBuilder.php.
◆ isNullEdit()
| MediaWiki\Storage\EditResultBuilder::isNullEdit |
( |
| ) |
|
|
private |
An edit is a null edit if the original revision is equal to the parent revision.
- Returns
- bool
Definition at line 206 of file EditResultBuilder.php.
◆ markAsRevert()
| MediaWiki\Storage\EditResultBuilder::markAsRevert |
( |
int |
$revertMethod, |
|
|
int |
$oldestRevertedRevId, |
|
|
int |
$newestRevertedRevId = 0 |
|
) |
| |
Marks this edit as a revert and applies relevant information.
Will do nothing if $oldestRevertedRevId is 0.
- Parameters
-
| int | $revertMethod | The method used to make the revert: REVERT_UNDO, REVERT_ROLLBACK or REVERT_MANUAL |
| int | $oldestRevertedRevId | The ID of the oldest revision that was reverted. |
| int | $newestRevertedRevId | The ID of the newest revision that was reverted. This parameter is optional, default value is $oldestRevertedRevId |
Definition at line 131 of file EditResultBuilder.php.
◆ setIsNew()
| MediaWiki\Storage\EditResultBuilder::setIsNew |
( |
bool |
$isNew | ) |
|
Set whether the edit created a new page.
Should only be called by PageUpdater when saving an edit.
- Parameters
-
Definition at line 117 of file EditResultBuilder.php.
◆ setOriginalRevisionId()
| MediaWiki\Storage\EditResultBuilder::setOriginalRevisionId |
( |
|
$originalRevId | ) |
|
Sets the ID of an earlier revision that is being repeated or restored.
- Parameters
-
Definition at line 153 of file EditResultBuilder.php.
◆ setRevisionRecord()
| MediaWiki\Storage\EditResultBuilder::setRevisionRecord |
( |
RevisionRecord |
$revisionRecord | ) |
|
Set the revision associated with this edit.
Should only be called by PageUpdater when saving an edit.
- Parameters
-
| RevisionRecord | $revisionRecord | |
Definition at line 107 of file EditResultBuilder.php.
◆ $isNew
| bool MediaWiki\Storage\EditResultBuilder::$isNew = false |
|
private |
◆ $newestRevertedRevId
| int null MediaWiki\Storage\EditResultBuilder::$newestRevertedRevId = null |
|
private |
◆ $oldestRevertedRevId
| int null MediaWiki\Storage\EditResultBuilder::$oldestRevertedRevId = null |
|
private |
◆ $originalRevision
| RevisionRecord null MediaWiki\Storage\EditResultBuilder::$originalRevision = null |
|
private |
◆ $originalRevisionId
| bool int MediaWiki\Storage\EditResultBuilder::$originalRevisionId = false |
|
private |
◆ $revertMethod
| int null MediaWiki\Storage\EditResultBuilder::$revertMethod = null |
|
private |
◆ $revisionRecord
| RevisionRecord null MediaWiki\Storage\EditResultBuilder::$revisionRecord = null |
|
private |
◆ $revisionStore
| RevisionStore MediaWiki\Storage\EditResultBuilder::$revisionStore |
|
private |
◆ $softwareTags
| string [] MediaWiki\Storage\EditResultBuilder::$softwareTags |
|
private |
The documentation for this class was generated from the following file: