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

Public Member Functions

 __construct (ApiMain $mainModule, string $moduleName, EntityRevisionLookup $entityRevisionLookup, MediaWikiEditEntityFactory $editEntityFactory, EditSenseElementsRequestParser $requestParser, SummaryFormatter $summaryFormatter, SenseSerializer $senseSerializer, ApiHelperFactory $apiHelperFactory, 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, ChangeOpFactoryProvider $changeOpFactoryProvider, MediaWikiEditEntityFactory $editEntityFactory, EntityIdParser $entityIdParser, EntityStore $entityStore, Deserializer $externalFormatStatementDeserializer, Store $store, StringNormalizer $stringNormalizer, SummaryFormatter $summaryFormatter)
 

Protected Member Functions

 getAllowedParams ()
 
 getExamplesMessages ()
 

Private Member Functions

 saveSense (Sense $sense, string $summary, int $baseRevisionId, array $params)
 
 generateResponse (Sense $sense, EditEntityStatus $status, array $params)
 
 getRevIdForWhenUserWasLastToEdit (int $latestRevisionId, int $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 $entityRevisionLookup
 
MediaWikiEditEntityFactory $editEntityFactory
 
EditSenseElementsRequestParser $requestParser
 
SummaryFormatter $summaryFormatter
 
SenseSerializer $senseSerializer
 
ResultBuilder $resultBuilder
 
ApiErrorReporter $errorReporter
 
EntityStore $entityStore
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

Wikibase\Lexeme\MediaWiki\Api\EditSenseElements::__construct ( ApiMain $mainModule,
string $moduleName,
EntityRevisionLookup $entityRevisionLookup,
MediaWikiEditEntityFactory $editEntityFactory,
EditSenseElementsRequestParser $requestParser,
SummaryFormatter $summaryFormatter,
SenseSerializer $senseSerializer,
ApiHelperFactory $apiHelperFactory,
EntityStore $entityStore )

Member Function Documentation

◆ execute()

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

PhanTypeMismatchArgument

◆ factory()

static Wikibase\Lexeme\MediaWiki\Api\EditSenseElements::factory ( ApiMain $mainModule,
string $moduleName,
ApiHelperFactory $apiHelperFactory,
SerializerFactory $baseDataModelSerializerFactory,
ChangeOpFactoryProvider $changeOpFactoryProvider,
MediaWikiEditEntityFactory $editEntityFactory,
EntityIdParser $entityIdParser,
EntityStore $entityStore,
Deserializer $externalFormatStatementDeserializer,
Store $store,
StringNormalizer $stringNormalizer,
SummaryFormatter $summaryFormatter )
static

◆ generateResponse()

Wikibase\Lexeme\MediaWiki\Api\EditSenseElements::generateResponse ( Sense $sense,
EditEntityStatus $status,
array $params )
private

◆ getAllowedParams()

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

◆ getExamplesMessages()

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

◆ getRevIdForWhenUserWasLastToEdit()

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

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

◆ isInternal()

Wikibase\Lexeme\MediaWiki\Api\EditSenseElements::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\EditSenseElements::isWriteMode ( )

◆ mustBePosted()

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

◆ needsToken()

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

◆ saveSense()

Wikibase\Lexeme\MediaWiki\Api\EditSenseElements::saveSense ( Sense $sense,
string $summary,
int $baseRevisionId,
array $params )
private

Member Data Documentation

◆ $editEntityFactory

MediaWikiEditEntityFactory Wikibase\Lexeme\MediaWiki\Api\EditSenseElements::$editEntityFactory
private

◆ $entityRevisionLookup

EntityRevisionLookup Wikibase\Lexeme\MediaWiki\Api\EditSenseElements::$entityRevisionLookup
private

◆ $entityStore

EntityStore Wikibase\Lexeme\MediaWiki\Api\EditSenseElements::$entityStore
private

◆ $errorReporter

ApiErrorReporter Wikibase\Lexeme\MediaWiki\Api\EditSenseElements::$errorReporter
private

◆ $requestParser

EditSenseElementsRequestParser Wikibase\Lexeme\MediaWiki\Api\EditSenseElements::$requestParser
private

◆ $resultBuilder

ResultBuilder Wikibase\Lexeme\MediaWiki\Api\EditSenseElements::$resultBuilder
private

◆ $senseSerializer

SenseSerializer Wikibase\Lexeme\MediaWiki\Api\EditSenseElements::$senseSerializer
private

◆ $summaryFormatter

SummaryFormatter Wikibase\Lexeme\MediaWiki\Api\EditSenseElements::$summaryFormatter
private

◆ LATEST_REVISION

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

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