|
Wikibase
MediaWiki Wikibase extension
|
An interactor implementing the use case of creating a redirect. More...
Inheritance diagram for Wikibase\Repo\Interactors\EntityRedirectCreationInteractor:
Collaboration diagram for Wikibase\Repo\Interactors\EntityRedirectCreationInteractor:Public Member Functions | |
| __construct (EntityRevisionLookup $entityRevisionLookup, EntityStore $entityStore, EntityPermissionChecker $permissionChecker, SummaryFormatter $summaryFormatter, EditFilterHookRunner $editFilterHookRunner, EntityRedirectTargetLookup $entityRedirectLookup, EntityTitleStoreLookup $entityTitleLookup, TempUserCreator $tempUserCreator) | |
| createRedirect (EntityId $fromId, EntityId $toId, bool $bot, array $tags, IContextSource $context) | |
| Create a redirect at $fromId pointing to $toId. | |
Protected Member Functions | |
| assertEntityIsRedirectable (EntityDocument $entity) | |
| Used to assert that the source entity is redirectable. | |
Private Member Functions | |
| checkPermissions (EntityId $entityId, IContextSource $context) | |
| Check user's permissions for the given entity ID. | |
| checkRateLimits (IContextSource $context) | |
| checkCanCreateRedirect (EntityId $entityId) | |
| checkExistsNoRedirect (EntityId $entityId) | |
| checkCompatible (EntityId $fromId, EntityId $toId) | |
| checkSourceAndTargetNotTheSame (EntityId $fromId, EntityId $toId) | |
| saveRedirect (EntityRedirect $redirect, FormatableSummary $summary, IContextSource $context, bool $bot, array $tags) | |
An interactor implementing the use case of creating a redirect.
| Wikibase\Repo\Interactors\EntityRedirectCreationInteractor::__construct | ( | EntityRevisionLookup | $entityRevisionLookup, |
| EntityStore | $entityStore, | ||
| EntityPermissionChecker | $permissionChecker, | ||
| SummaryFormatter | $summaryFormatter, | ||
| EditFilterHookRunner | $editFilterHookRunner, | ||
| EntityRedirectTargetLookup | $entityRedirectLookup, | ||
| EntityTitleStoreLookup | $entityTitleLookup, | ||
| TempUserCreator | $tempUserCreator ) |
|
abstractprotected |
Used to assert that the source entity is redirectable.
This can differ depending on the entity type.
| EntityDocument | $entity |
| RedirectCreationException |
Reimplemented in Wikibase\Repo\Interactors\ItemRedirectCreationInteractor.
|
private |
| EntityId | $entityId |
| RedirectCreationException |
|
private |
| EntityId | $fromId | |
| EntityId | $toId |
| RedirectCreationException |
|
private |
| EntityId | $entityId |
| RedirectCreationException |
|
private |
Check user's permissions for the given entity ID.
| EntityId | $entityId | |
| IContextSource | $context |
| RedirectCreationException | if the permission check fails |
|
private |
|
private |
| Wikibase\Repo\Interactors\EntityRedirectCreationInteractor::createRedirect | ( | EntityId | $fromId, |
| EntityId | $toId, | ||
| bool | $bot, | ||
| array | $tags, | ||
| IContextSource | $context ) |
Create a redirect at $fromId pointing to $toId.
| EntityId | $fromId | The ID of the entity to be replaced by the redirect. The entity must exist and be empty (or be a redirect already). |
| EntityId | $toId | The ID of the entity the redirect should point to. The Entity must exist and must not be a redirect. |
| bool | $bot | Whether the edit should be marked as bot |
| string[] | $tags | |
| IContextSource | null | $context | The context to pass to the edit filter hook and check permissions |
| RedirectCreationException | If creating the redirect fails. Calling code may use RedirectCreationException::getErrorCode() to get further information about the cause of the failure. PhanTypeMismatchDeclaredParam |
|
private |
| RedirectCreationException |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |