MediaWiki master
|
Domain event representing page moves. More...
Inherits MediaWiki\Page\Event\PageStateEvent.
Public Member Functions | |
__construct (ExistingPageRecord $pageRecordBefore, ExistingPageRecord $pageRecordAfter, UserIdentity $performer) | |
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. | |
![]() | |
__construct (string $cause, ?ExistingPageRecord $pageRecordBefore, ?ExistingPageRecord $pageRecordAfter, 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. | |
![]() | |
__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 | TYPE = 'PageMoved' |
![]() | |
const | TYPE = 'PageState' |
![]() | |
const | ANY = '*' |
Additional Inherited Members | |
![]() | |
hasFlag (string $name) | |
Checks flags describing the page update. | |
![]() | |
declareEventType (string $eventType) | |
Declares the event type. | |
Domain event representing page moves.
PageMovedEvent is a special case of an PageRevisionUpdatedEvent. It exists as a separate event to accommodate listeners that are only interested in the title change.
Definition at line 38 of file PageMovedEvent.php.
MediaWiki\Page\Event\PageMovedEvent::__construct | ( | ExistingPageRecord | $pageRecordBefore, |
ExistingPageRecord | $pageRecordAfter, | ||
UserIdentity | $performer ) |
ExistingPageRecord | $pageRecordBefore | The page before the move. |
ExistingPageRecord | $pageRecordAfter | The page after the move. |
UserIdentity | $performer | The user performing the move. |
Definition at line 46 of file PageMovedEvent.php.
References MediaWiki\DomainEvent\DomainEvent\declareEventType(), and MediaWiki\Page\ProperPageIdentity\getId().
MediaWiki\Page\Event\PageMovedEvent::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\PageStateEvent.
Definition at line 79 of file PageMovedEvent.php.
MediaWiki\Page\Event\PageMovedEvent::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\PageStateEvent.
Definition at line 70 of file PageMovedEvent.php.
const MediaWiki\Page\Event\PageMovedEvent::TYPE = 'PageMoved' |
Definition at line 39 of file PageMovedEvent.php.