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 (Article $article, IContextSource $context, PermissionManager $permissionManager, RevisionLookup $revisionLookup, UserOptionsLookup $userOptionsLookup, WatchlistManager $watchlistManager, WikiPageFactory $wikiPageFactory, AnonymousEditWarningBuilder $anonymousEditWarningBuilder, EditFilterHookRunner $editFilterHookRunner, EntityDiffVisualizerFactory $entityDiffVisualizerFactory, SummaryFormatter $summaryFormatter)
 
 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
 __construct (Article $article, IContextSource $context, PermissionManager $permissionManager, RevisionLookup $revisionLookup, AnonymousEditWarningBuilder $anonymousEditWarningBuilder, EntityDiffVisualizerFactory $entityDiffVisualizerFactory)
 
 requiresUnblock ()
 
 requiresWrite ()
 

Public Attributes

const SPEC
 ObjectFactory specification for this class, to be returned by EntityHandler::getActionOverrides() implementations.
 
- Public Attributes inherited from Wikibase\Repo\Actions\EditEntityAction
const SPEC
 ObjectFactory specification for this class, to be returned by EntityHandler::getActionOverrides() implementations.
 

Private Member Functions

 makeSummary ( $actionName, RevisionRecord $revision, $userSummary)
 
 attemptSave (Title $title, EntityContent $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

UserOptionsLookup $userOptionsLookup
 
WatchlistManager $watchlistManager
 
WikiPageFactory $wikiPageFactory
 
EditFilterHookRunner $editFilterHookRunner
 
SummaryFormatter $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 ()
 
- Protected Attributes inherited from Wikibase\Repo\Actions\EditEntityAction
PermissionManager $permissionManager
 

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 ( Article $article,
IContextSource $context,
PermissionManager $permissionManager,
RevisionLookup $revisionLookup,
UserOptionsLookup $userOptionsLookup,
WatchlistManager $watchlistManager,
WikiPageFactory $wikiPageFactory,
AnonymousEditWarningBuilder $anonymousEditWarningBuilder,
EditFilterHookRunner $editFilterHookRunner,
EntityDiffVisualizerFactory $entityDiffVisualizerFactory,
SummaryFormatter $summaryFormatter )

Member Function Documentation

◆ attemptSave()

Wikibase\Repo\Actions\SubmitEntityAction::attemptSave ( Title $title,
EntityContent $content,
$summary,
$undidRevId,
$originalRevId,
$editToken )
private
Parameters
Title$title
EntityContent$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 ( )

◆ 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

◆ $editFilterHookRunner

EditFilterHookRunner Wikibase\Repo\Actions\SubmitEntityAction::$editFilterHookRunner
private

◆ $summaryFormatter

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

◆ $userOptionsLookup

UserOptionsLookup Wikibase\Repo\Actions\SubmitEntityAction::$userOptionsLookup
private

◆ $watchlistManager

WatchlistManager Wikibase\Repo\Actions\SubmitEntityAction::$watchlistManager
private

◆ $wikiPageFactory

WikiPageFactory Wikibase\Repo\Actions\SubmitEntityAction::$wikiPageFactory
private

◆ SPEC

const Wikibase\Repo\Actions\SubmitEntityAction::SPEC
Initial value:
= [
'class' => self::class,
'services' => [
'PermissionManager',
'RevisionLookup',
'UserOptionsLookup',
'WatchlistManager',
'WikiPageFactory',
'WikibaseRepo.AnonymousEditWarningBuilder',
'WikibaseRepo.EditFilterHookRunner',
'WikibaseRepo.EntityDiffVisualizerFactory',
'WikibaseRepo.SummaryFormatter',
],
]

ObjectFactory specification for this class, to be returned by EntityHandler::getActionOverrides() implementations.


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