|
MediaWiki master
|
Domain event representing changes to page protection (aka restriction levels). More...
Inherits MediaWiki\Page\Event\PageEvent.

Public Member Functions | |
| __construct (PageIdentity $page, array $restrictionMapBefore, array $restrictionMapAfter, array $expiryAfter, bool $isCascadingAfter, UserIdentity $performer, string $reason, array $tags=[]) | |
| getExpiryAfter () | |
| The expiry timestamp for the restrictions on each action returned by getRestrictionMapAfter(). | |
| getPage () | |
| getReason () | |
| Returns the reason supplied be the user. | |
| getRestrictionMapAfter () | |
| Returns the restrictions that are updated by this change. | |
| getRestrictionMapBefore () | |
| Returns the restrictions that are updated by this change. | |
| isCascadingAfter () | |
| Whether the updated restrictions are applied in cascading mode. | |
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 | TYPE = 'PageProtectionChanged' |
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 changes to page protection (aka restriction levels).
They are emitted by WikiPage::doUpdateRestrictions().
Definition at line 23 of file PageProtectionChangedEvent.php.
| MediaWiki\Page\Event\PageProtectionChangedEvent::__construct | ( | PageIdentity | $page, |
| array | $restrictionMapBefore, | ||
| array | $restrictionMapAfter, | ||
| array | $expiryAfter, | ||
| bool | $isCascadingAfter, | ||
| UserIdentity | $performer, | ||
| string | $reason, | ||
| array | $tags = [] ) |
| PageIdentity | $page | |
| array<string,list<string>> | $restrictionMapBefore Page protection before the change, given as an associative array that maps actions to a list of permissions a user must have to perform it. | |
| array<string,list<string>> | $restrictionMapAfter Page protection after the change, given as an associative array that maps actions to a list of permissions a user must have to perform it. | |
| array<string,string> | $expiryAfter An expiry timestamp (or infinite) for each action in $restrictionMapAfter. | |
| bool | $isCascadingAfter | |
| UserIdentity | $performer | |
| string | $reason | |
| array | $tags |
Definition at line 59 of file PageProtectionChangedEvent.php.
References MediaWiki\DomainEvent\DomainEvent\declareEventType(), MediaWiki\Page\PageIdentity\getId(), and MediaWiki\Page\Event\PageProtectionChangedEvent\isCascadingAfter().
| MediaWiki\Page\Event\PageProtectionChangedEvent::getExpiryAfter | ( | ) |
The expiry timestamp for the restrictions on each action returned by getRestrictionMapAfter().
Definition at line 112 of file PageProtectionChangedEvent.php.
| MediaWiki\Page\Event\PageProtectionChangedEvent::getPage | ( | ) |
Definition at line 124 of file PageProtectionChangedEvent.php.
| MediaWiki\Page\Event\PageProtectionChangedEvent::getReason | ( | ) |
Returns the reason supplied be the user.
Definition at line 131 of file PageProtectionChangedEvent.php.
| MediaWiki\Page\Event\PageProtectionChangedEvent::getRestrictionMapAfter | ( | ) |
Returns the restrictions that are updated by this change.
Actions not mentioned in this map are unaffected by the change, they may or may not be restricted.
Definition at line 159 of file PageProtectionChangedEvent.php.
| MediaWiki\Page\Event\PageProtectionChangedEvent::getRestrictionMapBefore | ( | ) |
Returns the restrictions that are updated by this change.
This map should provide information for all actions that are also present in the return value of getRestrictionMapAfter().
Actions not mentioned in this map are unaffected by the change, they may or may not have been restricted.
Definition at line 147 of file PageProtectionChangedEvent.php.
| MediaWiki\Page\Event\PageProtectionChangedEvent::isCascadingAfter | ( | ) |
Whether the updated restrictions are applied in cascading mode.
Actions not affected by this change may retain a different cascading mode.
Definition at line 120 of file PageProtectionChangedEvent.php.
Referenced by MediaWiki\Page\Event\PageProtectionChangedEvent\__construct().
| const MediaWiki\Page\Event\PageProtectionChangedEvent::TYPE = 'PageProtectionChanged' |
Definition at line 24 of file PageProtectionChangedEvent.php.