|
MediaWiki master
|
Builder class for the EditResult object. More...
Public Member Functions | |
| __construct (RevisionStore $revisionStore, array $softwareTags, ServiceOptions $options) | |
| buildEditResult () | |
| markAsRevert (int $revertMethod, int $newestRevertedRevId, ?int $revertAfterRevId=null) | |
| Marks this edit as a revert and applies relevant information. | |
| setIsNew (bool $isNew) | |
| Set whether the edit created a new page. | |
| setOriginalRevision ( $originalRevision) | |
| setRevisionRecord (RevisionRecord $revisionRecord) | |
| Set the revision associated with this edit. | |
Public Attributes | |
| const | CONSTRUCTOR_OPTIONS |
Builder class for the EditResult object.
Definition at line 22 of file EditResultBuilder.php.
| MediaWiki\Storage\EditResultBuilder::__construct | ( | RevisionStore | $revisionStore, |
| array | $softwareTags, | ||
| ServiceOptions | $options ) |
| RevisionStore | $revisionStore | |
| string[] | $softwareTags | Array of currently enabled software change tags. Can be obtained from ChangeTagsStore->getSoftwareTags() |
| ServiceOptions | $options | Options for this instance. |
Definition at line 77 of file EditResultBuilder.php.
References MediaWiki\Config\ServiceOptions\assertRequiredOptions().
| MediaWiki\Storage\EditResultBuilder::buildEditResult | ( | ) |
Definition at line 89 of file EditResultBuilder.php.
| MediaWiki\Storage\EditResultBuilder::markAsRevert | ( | int | $revertMethod, |
| int | $newestRevertedRevId, | ||
| ?int | $revertAfterRevId = null ) |
Marks this edit as a revert and applies relevant information.
| int | $revertMethod | The method used to make the revert: REVERT_UNDO, REVERT_ROLLBACK or REVERT_MANUAL |
| int | $newestRevertedRevId | the revision ID of the latest reverted revision. |
| int | null | $revertAfterRevId | the revision ID after which revisions are being reverted. Defaults to the revision before the $newestRevertedRevId. |
Definition at line 139 of file EditResultBuilder.php.
References MediaWiki\Storage\EditResult\REVERT_MANUAL, MediaWiki\Storage\EditResult\REVERT_ROLLBACK, and MediaWiki\Storage\EditResult\REVERT_UNDO.
| MediaWiki\Storage\EditResultBuilder::setIsNew | ( | bool | $isNew | ) |
Set whether the edit created a new page.
Should only be called by PageUpdater when saving an edit.
Definition at line 126 of file EditResultBuilder.php.
| MediaWiki\Storage\EditResultBuilder::setOriginalRevision | ( | $originalRevision | ) |
| RevisionRecord | int | false | null | $originalRevision | RevisionRecord or revision ID for the original revision. False or null to unset. |
Definition at line 177 of file EditResultBuilder.php.
| MediaWiki\Storage\EditResultBuilder::setRevisionRecord | ( | RevisionRecord | $revisionRecord | ) |
Set the revision associated with this edit.
Should only be called by PageUpdater when saving an edit.
Definition at line 118 of file EditResultBuilder.php.
| const MediaWiki\Storage\EditResultBuilder::CONSTRUCTOR_OPTIONS |
Definition at line 24 of file EditResultBuilder.php.
Referenced by MediaWiki\Storage\PageUpdater\__construct().