|
MediaWiki master
|
Domain event representing page deletion. More...
Inherits MediaWiki\Page\Event\PageRecordChangedEvent.

Public Member Functions | |
| __construct (ExistingPageRecord $pageRecordBefore, RevisionRecord $latestRevisionBefore, UserIdentity $performer, array $tags, array $flags, $timestamp, string $reason, int $archivedRevisionCount, ?LinkTarget $redirectTarget=null) | |
| getArchivedRevisionCount () | |
| Returns the number of revisions archived by the deletion. | |
| getDeletedPage () | |
| Returns the page that was deleted, as it was before the deletion. | |
| getLatestRevisionBefore () | |
| Returns the revision that was the page's latest revision when the page was deleted. | |
| getPage () | |
| Returns the page that was deleted, as it was before the deletion. | |
| getPageRecordAfter () | |
| Returns a PageRecord representing the state of the page after the change, or null if the page no longer exists after.Note that the PageRecord returned by this method may be the same as the one returned by getPageRecordBefore(). This may be the case for reconciliation events, but also for events that represent changes that are not reflected in the PageRecord. | |
| getPageRecordBefore () | |
| Returns a PageRecord representing the state of the page before the change, or null if the page did not exist before. | |
| getReason () | |
| Returns the reason for deletion, as supplied by the user. | |
| getRedirectTargetBefore () | |
| Returns the redirect destination of the page before the change, or null if the page was not a redirect. | |
| isSuppressed () | |
| Whether the deleted revisions and log have been suppressed, so they are not visible in the regular deletion log. | |
| wasRedirect () | |
| Whether the deleted page was a redirect. | |
Public Member Functions inherited from MediaWiki\Page\Event\PageRecordChangedEvent | |
| __construct (string $cause, ?ExistingPageRecord $pageRecordBefore, ?ExistingPageRecord $pageRecordAfter, UserIdentity $performer, array $tags=[], array $flags=[], $timestamp=false) | |
Public Member Functions inherited from MediaWiki\Page\Event\PageEvent | |
| __construct (string $cause, int $pageId, UserIdentity $performer, array $tags=[], array $flags=[], $timestamp=false) | |
| getCause () | |
| Indicates the cause of the update. | |
| getPageId () | |
| Returns the ID of the page affected by the change. | |
| getPerformer () | |
| Returns the user that performed the update. | |
| getTags () | |
| Returns any tags applied to the edit. | |
| hasCause (string $cause) | |
| Checks whether the update had the given cause. | |
| hasTag (string $name) | |
| Checks for a tag associated the page update. | |
Public Member Functions inherited from MediaWiki\DomainEvent\DomainEvent | |
| __construct ( $timestamp=false, bool $isReconciliationRequest=false) | |
| getEventTimestamp () | |
| Returns the time at which the event was emitted. | |
| getEventType () | |
| Returns this event's type. | |
| getEventTypeChain () | |
| Returns the event types this event is compatible with. | |
| isReconciliationRequest () | |
| Determines whether this is a reconciliation event, triggered artificially in order to give listeners an opportunity to catch up on missed events or recreate corrupted data. | |
Public Attributes | |
| const | FLAG_SUPPRESSED = 'suppressed' |
| Whether the deleted revisions and log have been suppressed, so they are not visible in the regular deletion log. | |
| const | TYPE = 'PageDeleted' |
Public Attributes inherited from MediaWiki\Page\Event\PageRecordChangedEvent | |
| const | TYPE = 'PageRecordChanged' |
Public Attributes inherited from MediaWiki\Page\Event\PageEvent | |
| const | TYPE = 'Page' |
Public Attributes inherited from MediaWiki\DomainEvent\DomainEvent | |
| const | ANY = '*' |
Additional Inherited Members | |
Protected Member Functions inherited from MediaWiki\Page\Event\PageEvent | |
| hasFlag (string $name) | |
| Checks flags describing the page update. | |
Protected Member Functions inherited from MediaWiki\DomainEvent\DomainEvent | |
| declareEventType (string $eventType) | |
| Declares the event type. | |
Domain event representing page deletion.
Definition at line 21 of file PageDeletedEvent.php.
| MediaWiki\Page\Event\PageDeletedEvent::__construct | ( | ExistingPageRecord | $pageRecordBefore, |
| RevisionRecord | $latestRevisionBefore, | ||
| UserIdentity | $performer, | ||
| array | $tags, | ||
| array | $flags, | ||
| $timestamp, | |||
| string | $reason, | ||
| int | $archivedRevisionCount, | ||
| ?LinkTarget | $redirectTarget = null ) |
| ExistingPageRecord | $pageRecordBefore | |
| RevisionRecord | $latestRevisionBefore | |
| UserIdentity | $performer | |
| array<string> | $tags | |
| array<string,bool> | $flags | |
| string | ConvertibleTimestamp | false | $timestamp | |
| string | $reason | |
| int | $archivedRevisionCount | |
| ?LinkTarget | $redirectTarget |
Definition at line 47 of file PageDeletedEvent.php.
References MediaWiki\DomainEvent\DomainEvent\declareEventType(), and MediaWiki\Page\ExistingPageRecord\exists().
| MediaWiki\Page\Event\PageDeletedEvent::getArchivedRevisionCount | ( | ) |
Returns the number of revisions archived by the deletion.
Definition at line 135 of file PageDeletedEvent.php.
| MediaWiki\Page\Event\PageDeletedEvent::getDeletedPage | ( | ) |
Returns the page that was deleted, as it was before the deletion.
Definition at line 104 of file PageDeletedEvent.php.
Referenced by MediaWiki\Language\LanguageEventIngress\handlePageDeletedEvent().
| MediaWiki\Page\Event\PageDeletedEvent::getLatestRevisionBefore | ( | ) |
Returns the revision that was the page's latest revision when the page was deleted.
Definition at line 121 of file PageDeletedEvent.php.
| MediaWiki\Page\Event\PageDeletedEvent::getPage | ( | ) |
Returns the page that was deleted, as it was before the deletion.
Definition at line 113 of file PageDeletedEvent.php.
| MediaWiki\Page\Event\PageDeletedEvent::getPageRecordAfter | ( | ) |
Returns a PageRecord representing the state of the page after the change, or null if the page no longer exists after.Note that the PageRecord returned by this method may be the same as the one returned by getPageRecordBefore(). This may be the case for reconciliation events, but also for events that represent changes that are not reflected in the PageRecord.
Reimplemented from MediaWiki\Page\Event\PageRecordChangedEvent.
Definition at line 97 of file PageDeletedEvent.php.
| MediaWiki\Page\Event\PageDeletedEvent::getPageRecordBefore | ( | ) |
Returns a PageRecord representing the state of the page before the change, or null if the page did not exist before.
Reimplemented from MediaWiki\Page\Event\PageRecordChangedEvent.
Definition at line 85 of file PageDeletedEvent.php.
| MediaWiki\Page\Event\PageDeletedEvent::getReason | ( | ) |
Returns the reason for deletion, as supplied by the user.
Definition at line 128 of file PageDeletedEvent.php.
| MediaWiki\Page\Event\PageDeletedEvent::getRedirectTargetBefore | ( | ) |
Returns the redirect destination of the page before the change, or null if the page was not a redirect.
Definition at line 163 of file PageDeletedEvent.php.
| MediaWiki\Page\Event\PageDeletedEvent::isSuppressed | ( | ) |
Whether the deleted revisions and log have been suppressed, so they are not visible in the regular deletion log.
Definition at line 146 of file PageDeletedEvent.php.
| MediaWiki\Page\Event\PageDeletedEvent::wasRedirect | ( | ) |
Whether the deleted page was a redirect.
Definition at line 154 of file PageDeletedEvent.php.
| const MediaWiki\Page\Event\PageDeletedEvent::FLAG_SUPPRESSED = 'suppressed' |
Whether the deleted revisions and log have been suppressed, so they are not visible in the regular deletion log.
Definition at line 29 of file PageDeletedEvent.php.
| const MediaWiki\Page\Event\PageDeletedEvent::TYPE = 'PageDeleted' |
Definition at line 23 of file PageDeletedEvent.php.