Wikibase
MediaWiki Wikibase extension
Loading...
Searching...
No Matches
Wikibase\Repo\Actions\SubmitEntityAction Class Reference

Handles the submit action for Wikibase entities. More...

+ Inheritance diagram for Wikibase\Repo\Actions\SubmitEntityAction:
+ Collaboration diagram for Wikibase\Repo\Actions\SubmitEntityAction:

Public Member Functions

 __construct (Page $page, IContextSource $context=null)
 
 getName ()
 
 doesWrites ()
 
 show ()
 Show the entity using parent::show(), unless an undo operation is requested.
 
 execute ()
 
- Public Member Functions inherited from Wikibase\Repo\Actions\EditEntityAction
 requiresUnblock ()
 
 requiresWrite ()
 

Private Member Functions

 makeSummary ( $actionName, RevisionRecord $revision, $userSummary)
 
 attemptSave (Title $title, Content $content, $summary, $undidRevId, $originalRevId, $editToken)
 
 getPermissionStatus ( $permission, Title $title, $rigor=PermissionManager::RIGOR_SECURE)
 Checks the given permission.
 
 getEditTokenStatus ( $editToken)
 Checks that the given token is valid.
 
 doWatch (Title $title)
 Update watchlist.
 

Private Attributes

 $summaryFormatter
 

Additional Inherited Members

- Static Public Member Functions inherited from Wikibase\Repo\Actions\ViewEntityAction
static onBeforeDisplayNoArticleText (Article $article)
 Handler for the BeforeDisplayNoArticleText called by Article.
 
- Protected Member Functions inherited from Wikibase\Repo\Actions\EditEntityAction
 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.
 
- Protected Member Functions inherited from Wikibase\Repo\Actions\ViewEntityAction
 getDescription ()
 

Detailed Description

Handles the submit action for Wikibase entities.

This performs the undo and restore operations when requested. Otherwise it will just show the normal entity view.

Author
Jeroen De Dauw < jeroe.nosp@m.nded.nosp@m.auw@g.nosp@m.mail.nosp@m..com >
Jens Ohlig
Daniel Kinzler

Constructor & Destructor Documentation

◆ __construct()

Wikibase\Repo\Actions\SubmitEntityAction::__construct ( Page  $page,
IContextSource  $context = null 
)
See also
EditEntityAction::__construct
Parameters
Page$page
IContextSource | null$context

Reimplemented from Wikibase\Repo\Actions\EditEntityAction.

Member Function Documentation

◆ attemptSave()

Wikibase\Repo\Actions\SubmitEntityAction::attemptSave ( Title  $title,
Content  $content,
  $summary,
  $undidRevId,
  $originalRevId,
  $editToken 
)
private
Parameters
Title$title
Content$content
string$summary
int$undidRevId
int$originalRevId
string$editToken
Returns
Status

◆ doesWrites()

Wikibase\Repo\Actions\SubmitEntityAction::doesWrites ( )

◆ doWatch()

Wikibase\Repo\Actions\SubmitEntityAction::doWatch ( Title  $title)
private

Update watchlist.

Parameters
Title$title

◆ execute()

Wikibase\Repo\Actions\SubmitEntityAction::execute ( )
Exceptions
MWException

◆ getEditTokenStatus()

Wikibase\Repo\Actions\SubmitEntityAction::getEditTokenStatus (   $editToken)
private

Checks that the given token is valid.

Parameters
string$editToken
Returns
Status

◆ getName()

Wikibase\Repo\Actions\SubmitEntityAction::getName ( )
See also
Action::getName()
Returns
string

Reimplemented from Wikibase\Repo\Actions\EditEntityAction.

◆ getPermissionStatus()

Wikibase\Repo\Actions\SubmitEntityAction::getPermissionStatus (   $permission,
Title  $title,
  $rigor = PermissionManager::RIGOR_SECURE 
)
private

Checks the given permission.

Parameters
string$permission
Title$title
string$rigor
Returns
Status a status object representing the check's result.

◆ makeSummary()

Wikibase\Repo\Actions\SubmitEntityAction::makeSummary (   $actionName,
RevisionRecord  $revision,
  $userSummary 
)
private
Parameters
string$actionName
RevisionRecord$revision
string$userSummary
Returns
string

◆ show()

Wikibase\Repo\Actions\SubmitEntityAction::show ( )

Show the entity using parent::show(), unless an undo operation is requested.

In that case $this->undo(); is called to perform the action after a permission check.

Reimplemented from Wikibase\Repo\Actions\EditEntityAction.

Member Data Documentation

◆ $summaryFormatter

Wikibase\Repo\Actions\SubmitEntityAction::$summaryFormatter
private

The documentation for this class was generated from the following file: