Handles the edit action for Wikibase entities.
More...
|
| showPermissionError ( $action) |
| Show an error page if the user is not allowed to perform the given action.
|
|
| loadRevisions () |
| Loads the revisions specified by the web request and returns them as a three element array wrapped in a Status object.
|
|
| showUndoErrorPage (Status $status) |
| Output an error page showing the given status.
|
|
| getDescription () |
|
Handles the edit action for Wikibase entities.
This shows the forms for the undo and restore operations if requested. Otherwise it will just show the normal entity view.
- Copyright
- GPL-2.0-or-later
- Author
- Jeroen De Dauw < jeroe.nosp@m.nded.nosp@m.auw@g.nosp@m.mail.nosp@m..com >
-
Jens Ohlig
-
Daniel Kinzler
◆ __construct()
Wikibase\Repo\Actions\EditEntityAction::__construct |
( |
Article | $article, |
|
|
IContextSource | $context, |
|
|
PermissionManager | $permissionManager, |
|
|
RevisionLookup | $revisionLookup, |
|
|
AnonymousEditWarningBuilder | $anonymousEditWarningBuilder, |
|
|
EntityDiffVisualizerFactory | $entityDiffVisualizerFactory ) |
◆ displayUndoDiff()
◆ getCancelLink()
Wikibase\Repo\Actions\EditEntityAction::getCancelLink |
( |
| ) |
|
|
private |
Returns a cancel link back to viewing the entity's page.
- Returns
- string
◆ getEditButton()
Wikibase\Repo\Actions\EditEntityAction::getEditButton |
( |
| ) |
|
|
private |
◆ getName()
Wikibase\Repo\Actions\EditEntityAction::getName |
( |
| ) |
|
◆ getStatus()
Wikibase\Repo\Actions\EditEntityAction::getStatus |
( |
WebRequest | $req, |
|
|
RevisionRecord | $latestRevision ) |
|
private |
- Parameters
-
WebRequest | $req | |
RevisionRecord | $latestRevision | |
- Returns
- Status
◆ getSummaryInput()
Wikibase\Repo\Actions\EditEntityAction::getSummaryInput |
( |
| $labelText | ) |
|
|
private |
Generate standard summary input and label (wgSummary), compatible to \MediaWiki\EditPage\EditPage.
- Parameters
-
string | $labelText | The html to place inside the label |
- Returns
- string HTML
◆ getTitleText()
Wikibase\Repo\Actions\EditEntityAction::getTitleText |
( |
| ) |
|
|
private |
Used for overriding the page HTML title with the label, if available, or else the id.
This is passed via parser output and output page to save overhead on view / edit actions.
- Returns
- string
◆ loadRevisions()
Wikibase\Repo\Actions\EditEntityAction::loadRevisions |
( |
| ) |
|
|
protected |
Loads the revisions specified by the web request and returns them as a three element array wrapped in a Status object.
If any error arises, it will be reported using the status object.
- Returns
- Status A Status object containing an array with three revision record objects, [ $olderRevision, $newerRevision, $latestRevision ].
◆ requiresUnblock()
Wikibase\Repo\Actions\EditEntityAction::requiresUnblock |
( |
| ) |
|
◆ requiresWrite()
Wikibase\Repo\Actions\EditEntityAction::requiresWrite |
( |
| ) |
|
◆ show()
Wikibase\Repo\Actions\EditEntityAction::show |
( |
| ) |
|
◆ showConfirmationForm()
Wikibase\Repo\Actions\EditEntityAction::showConfirmationForm |
( |
| $undidRevision = 0 | ) |
|
|
private |
Shows a form that can be used to confirm the requested undo/restore action.
- Parameters
-
◆ showDiffStyle()
Wikibase\Repo\Actions\EditEntityAction::showDiffStyle |
( |
| ) |
|
|
private |
Add style sheets and supporting JS for diff display.
◆ showPermissionError()
Wikibase\Repo\Actions\EditEntityAction::showPermissionError |
( |
| $action | ) |
|
|
protected |
Show an error page if the user is not allowed to perform the given action.
- Parameters
-
string | $action | The action to check |
- Returns
- bool true if there were permission errors
◆ showUndoErrorPage()
Wikibase\Repo\Actions\EditEntityAction::showUndoErrorPage |
( |
Status | $status | ) |
|
|
protected |
Output an error page showing the given status.
- Parameters
-
Status | $status | The status to report. |
◆ $anonymousEditWarningBuilder
◆ $entityDiffVisualizer
Wikibase\Repo\Actions\EditEntityAction::$entityDiffVisualizer |
|
private |
◆ $permissionManager
PermissionManager Wikibase\Repo\Actions\EditEntityAction::$permissionManager |
|
protected |
◆ $revisionLookup
RevisionLookup Wikibase\Repo\Actions\EditEntityAction::$revisionLookup |
|
private |
◆ SPEC
const Wikibase\Repo\Actions\EditEntityAction::SPEC |
Initial value:= [
'class' => self::class,
'services' => [
'PermissionManager',
'RevisionLookup',
'WikibaseRepo.AnonymousEditWarningBuilder',
'WikibaseRepo.EntityDiffVisualizerFactory',
],
]
ObjectFactory
specification for this class, to be returned by EntityHandler::getActionOverrides()
implementations.
The documentation for this class was generated from the following file: