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

Public Member Functions

 __construct (ApiMain $mainModule, $moduleName, AddFormRequestParser $requestParser, FormSerializer $formSerializer, EntityRevisionLookup $entityRevisionLookup, MediawikiEditEntityFactory $editEntityFactory, SummaryFormatter $summaryFormatter, callable $errorReporterInstantiator)
 
 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, Store $store, SummaryFormatter $summaryFormatter)
 

Protected Member Functions

 getAllowedParams ()
 
 getExamplesMessages ()
 

Private Member Functions

 getFormWithMaxId (Lexeme $lexeme)
 
 getBaseLexemeRevisionFromRequest (AddFormRequest $request)
 
 buildSaveFlags (array $params)
 
 saveNewLexemeRevision (EntityDocument $lexeme, ?int $baseRevId, FormatableSummary $summary, $flags, array $tags)
 

Private Attributes

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

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

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

Member Function Documentation

◆ buildSaveFlags()

Wikibase\Lexeme\MediaWiki\Api\AddForm::buildSaveFlags ( array $params)
private
Returns
int

◆ factory()

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

◆ getAllowedParams()

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

◆ getBaseLexemeRevisionFromRequest()

Wikibase\Lexeme\MediaWiki\Api\AddForm::getBaseLexemeRevisionFromRequest ( AddFormRequest $request)
private
Exceptions

ApiUsageException

◆ getExamplesMessages()

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

◆ getFormWithMaxId()

Wikibase\Lexeme\MediaWiki\Api\AddForm::getFormWithMaxId ( Lexeme $lexeme)
private

◆ isInternal()

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

◆ mustBePosted()

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

◆ needsToken()

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

◆ saveNewLexemeRevision()

Wikibase\Lexeme\MediaWiki\Api\AddForm::saveNewLexemeRevision ( EntityDocument $lexeme,
?int $baseRevId,
FormatableSummary $summary,
$flags,
array $tags )
private

Member Data Documentation

◆ $editEntityFactory

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

◆ $entityRevisionLookup

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

◆ $errorReporter

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

◆ $formSerializer

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

◆ $requestParser

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

◆ $summaryFormatter

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

◆ LATEST_REVISION

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

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