WikibaseLexeme
MediaWiki WikibaseLexeme extension
Loading...
Searching...
No Matches
Wikibase\Lexeme\MediaWiki\Api\EditFormElements Class Reference
+ Inheritance diagram for Wikibase\Lexeme\MediaWiki\Api\EditFormElements:
+ Collaboration diagram for Wikibase\Lexeme\MediaWiki\Api\EditFormElements:

Public Member Functions

 __construct (ApiMain $mainModule, $moduleName, EntityRevisionLookup $entityRevisionLookup, MediawikiEditEntityFactory $editEntityFactory, EditFormElementsRequestParser $requestParser, SummaryFormatter $summaryFormatter, FormSerializer $formSerializer, callable $errorReporterInstantiator, EntityStore $entityStore)
 
 execute ()
 PhanTypeMismatchArgument
 
 isWriteMode ()
 
 isInternal ()
 As long as this codebase is in development and APIs might change any time without notice, we mark all as internal.
 
 needsToken ()
 
 mustBePosted ()
 

Static Public Member Functions

static factory (ApiMain $mainModule, string $moduleName, ApiHelperFactory $apiHelperFactory, SerializerFactory $baseDataModelSerializerFactory, MediawikiEditEntityFactory $editEntityFactory, EntityIdParser $entityIdParser, EntityStore $entityStore, Store $store, SummaryFormatter $summaryFormatter)
 

Protected Member Functions

 getAllowedParams ()
 
 getExamplesMessages ()
 

Private Member Functions

 saveForm (Form $form, $summary, $baseRevisionId, array $params)
 
 getRevIdForWhenUserWasLastToEdit ( $latestRevisionId, $baseRevId, EntityId $entityId)
 Returns $latestRevisionId if all of edits since $baseRevId are done by the same user, otherwise returns $baseRevId.
 

Private Attributes

const LATEST_REVISION = 0
 
 $entityRevisionLookup
 
 $editEntityFactory
 
 $requestParser
 
 $summaryFormatter
 
 $formSerializer
 
 $errorReporter
 
 $entityStore
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

Wikibase\Lexeme\MediaWiki\Api\EditFormElements::__construct ( ApiMain $mainModule,
$moduleName,
EntityRevisionLookup $entityRevisionLookup,
MediawikiEditEntityFactory $editEntityFactory,
EditFormElementsRequestParser $requestParser,
SummaryFormatter $summaryFormatter,
FormSerializer $formSerializer,
callable $errorReporterInstantiator,
EntityStore $entityStore )

Member Function Documentation

◆ execute()

Wikibase\Lexeme\MediaWiki\Api\EditFormElements::execute ( )

PhanTypeMismatchArgument

◆ factory()

static Wikibase\Lexeme\MediaWiki\Api\EditFormElements::factory ( ApiMain $mainModule,
string $moduleName,
ApiHelperFactory $apiHelperFactory,
SerializerFactory $baseDataModelSerializerFactory,
MediawikiEditEntityFactory $editEntityFactory,
EntityIdParser $entityIdParser,
EntityStore $entityStore,
Store $store,
SummaryFormatter $summaryFormatter )
static

◆ getAllowedParams()

Wikibase\Lexeme\MediaWiki\Api\EditFormElements::getAllowedParams ( )
protected

◆ getExamplesMessages()

Wikibase\Lexeme\MediaWiki\Api\EditFormElements::getExamplesMessages ( )
protected

◆ getRevIdForWhenUserWasLastToEdit()

Wikibase\Lexeme\MediaWiki\Api\EditFormElements::getRevIdForWhenUserWasLastToEdit ( $latestRevisionId,
$baseRevId,
EntityId $entityId )
private

Returns $latestRevisionId if all of edits since $baseRevId are done by the same user, otherwise returns $baseRevId.

Parameters
int$latestRevisionId
int$baseRevId
EntityId$entityId
Returns
int

◆ isInternal()

Wikibase\Lexeme\MediaWiki\Api\EditFormElements::isInternal ( )

As long as this codebase is in development and APIs might change any time without notice, we mark all as internal.

This adds an "unstable" notice, but does not hide them in any way.

◆ isWriteMode()

Wikibase\Lexeme\MediaWiki\Api\EditFormElements::isWriteMode ( )

◆ mustBePosted()

Wikibase\Lexeme\MediaWiki\Api\EditFormElements::mustBePosted ( )

◆ needsToken()

Wikibase\Lexeme\MediaWiki\Api\EditFormElements::needsToken ( )

◆ saveForm()

Wikibase\Lexeme\MediaWiki\Api\EditFormElements::saveForm ( Form $form,
$summary,
$baseRevisionId,
array $params )
private
Parameters
Form$form
string$summary
int$baseRevisionId
array$params
Returns
\Status

Member Data Documentation

◆ $editEntityFactory

Wikibase\Lexeme\MediaWiki\Api\EditFormElements::$editEntityFactory
private

◆ $entityRevisionLookup

Wikibase\Lexeme\MediaWiki\Api\EditFormElements::$entityRevisionLookup
private

◆ $entityStore

Wikibase\Lexeme\MediaWiki\Api\EditFormElements::$entityStore
private

◆ $errorReporter

Wikibase\Lexeme\MediaWiki\Api\EditFormElements::$errorReporter
private

◆ $formSerializer

Wikibase\Lexeme\MediaWiki\Api\EditFormElements::$formSerializer
private

◆ $requestParser

Wikibase\Lexeme\MediaWiki\Api\EditFormElements::$requestParser
private

◆ $summaryFormatter

Wikibase\Lexeme\MediaWiki\Api\EditFormElements::$summaryFormatter
private

◆ LATEST_REVISION

const Wikibase\Lexeme\MediaWiki\Api\EditFormElements::LATEST_REVISION = 0
private

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