WikibaseLexeme
MediaWiki WikibaseLexeme extension
Loading...
Searching...
No Matches
Wikibase\Lexeme\MediaWiki\Specials\SpecialNewLexeme Class Reference

New page for creating new Lexeme entities. More...

+ Inheritance diagram for Wikibase\Lexeme\MediaWiki\Specials\SpecialNewLexeme:
+ Collaboration diagram for Wikibase\Lexeme\MediaWiki\Specials\SpecialNewLexeme:

Public Member Functions

 __construct (array $tags, SpecialPageCopyrightView $copyrightView, LinkRenderer $linkRenderer, StatsdDataFactoryInterface $statsDataFactory, MediaWikiEditEntityFactory $editEntityFactory, EntityNamespaceLookup $entityNamespaceLookup, EntityTitleStoreLookup $entityTitleLookup, EntityLookup $entityLookup, EntityIdParser $entityIdParser, SummaryFormatter $summaryFormatter, EntityIdFormatterFactory $entityIdFormatterFactory, FallbackLabelDescriptionLookupFactory $labelDescriptionLookupFactory, ValidatorErrorLocalizer $validatorErrorLocalizer, LemmaTermValidator $lemmaTermValidator, AnonymousEditWarningBuilder $anonymousEditWarningBuilder, TempUserConfig $tempUserConfig)
 
 doesWrites ()
 
 execute ( $subPage)
 
 setHeaders ()
 
 getDescription ()
 

Static Public Member Functions

static factory (LinkRenderer $linkRenderer, StatsdDataFactoryInterface $statsDataFactory, TempUserConfig $tempUserConfig, AnonymousEditWarningBuilder $anonymousEditWarningBuilder, MediaWikiEditEntityFactory $editEntityFactory, EntityNamespaceLookup $entityNamespaceLookup, EntityTitleStoreLookup $entityTitleLookup, EntityLookup $entityLookup, EntityIdParser $entityIdParser, SettingsArray $repoSettings, SummaryFormatter $summaryFormatter, EntityIdFormatterFactory $entityIdFormatterFactory, FallbackLabelDescriptionLookupFactory $labelDescriptionLookupFactory, ValidatorErrorLocalizer $validatorErrorLocalizer, LemmaTermValidator $lemmaTermValidator)
 

Public Attributes

const FIELD_LEXEME_LANGUAGE = 'lexeme-language'
 
const FIELD_LEXICAL_CATEGORY = 'lexicalcategory'
 
const FIELD_LEMMA = 'lemma'
 
const FIELD_LEMMA_LANGUAGE = 'lemma-language'
 

Protected Member Functions

 getGroupName ()
 

Private Member Functions

 getUrlParamsForConfig ()
 
 getItemIdLabelDesc (EntityId $itemId, FallbackLabelDescriptionLookup $labelDescriptionLookup)
 
 extractLanguageCode (EntityId $languageId)
 
 createExampleParameters ()
 
 createTemplateParamsFromLexemeId (string $lexemeIdString)
 
 processInfoPanelTemplate (array $params)
 
 getLexicalCategorySuggestions ()
 Get the suggested lexical category items with their labels and descriptions.
 
 createForm (array $exampleLexemeParams)
 
 createEntityFromFormData (array $formData)
 
 redirectToEntityPage (EditEntityStatus $status)
 
 newEditEntity ()
 
 saveEntity (EntityDocument $entity, FormatableSummary $summary, string $token)
 
 getFormFields (array $exampleLexemeParams)
 
 checkBlocked ()
 
 checkBlockedOnNamespace ()
 
 getCopyrightHTML ()
 
 anonymousEditWarning ()
 

Static Private Member Functions

static termToArrayForJs (TermFallback $term)
 

Private Attributes

const FALLBACK_LANGUAGE_LABEL = 'English'
 
const FALLBACK_LEXICAL_CATEGORY_LABEL = 'verb'
 
array $tags
 
LinkRenderer $linkRenderer
 
StatsdDataFactoryInterface $statsDataFactory
 
MediaWikiEditEntityFactory $editEntityFactory
 
EntityNamespaceLookup $entityNamespaceLookup
 
EntityTitleStoreLookup $entityTitleLookup
 
EntityLookup $entityLookup
 
EntityIdParser $entityIdParser
 
SummaryFormatter $summaryFormatter
 
EntityIdFormatterFactory $entityIdFormatterFactory
 
FallbackLabelDescriptionLookupFactory $labelDescriptionLookupFactory
 
ValidatorErrorLocalizer $validatorErrorLocalizer
 
LemmaTermValidator $lemmaTermValidator
 
SpecialPageCopyrightView $copyrightView
 
AnonymousEditWarningBuilder $anonymousEditWarningBuilder
 
TempUserConfig $tempUserConfig
 

Detailed Description

New page for creating new Lexeme entities.

Constructor & Destructor Documentation

◆ __construct()

Wikibase\Lexeme\MediaWiki\Specials\SpecialNewLexeme::__construct ( array $tags,
SpecialPageCopyrightView $copyrightView,
LinkRenderer $linkRenderer,
StatsdDataFactoryInterface $statsDataFactory,
MediaWikiEditEntityFactory $editEntityFactory,
EntityNamespaceLookup $entityNamespaceLookup,
EntityTitleStoreLookup $entityTitleLookup,
EntityLookup $entityLookup,
EntityIdParser $entityIdParser,
SummaryFormatter $summaryFormatter,
EntityIdFormatterFactory $entityIdFormatterFactory,
FallbackLabelDescriptionLookupFactory $labelDescriptionLookupFactory,
ValidatorErrorLocalizer $validatorErrorLocalizer,
LemmaTermValidator $lemmaTermValidator,
AnonymousEditWarningBuilder $anonymousEditWarningBuilder,
TempUserConfig $tempUserConfig )

Member Function Documentation

◆ anonymousEditWarning()

Wikibase\Lexeme\MediaWiki\Specials\SpecialNewLexeme::anonymousEditWarning ( )
private
Returns
string HTML

◆ checkBlocked()

Wikibase\Lexeme\MediaWiki\Specials\SpecialNewLexeme::checkBlocked ( )
private
Exceptions
UserBlockedError

◆ checkBlockedOnNamespace()

Wikibase\Lexeme\MediaWiki\Specials\SpecialNewLexeme::checkBlockedOnNamespace ( )
private
Exceptions
UserBlockedError

◆ createEntityFromFormData()

Wikibase\Lexeme\MediaWiki\Specials\SpecialNewLexeme::createEntityFromFormData ( array $formData)
private

◆ createExampleParameters()

Wikibase\Lexeme\MediaWiki\Specials\SpecialNewLexeme::createExampleParameters ( )
private

◆ createForm()

Wikibase\Lexeme\MediaWiki\Specials\SpecialNewLexeme::createForm ( array $exampleLexemeParams)
private

◆ createTemplateParamsFromLexemeId()

Wikibase\Lexeme\MediaWiki\Specials\SpecialNewLexeme::createTemplateParamsFromLexemeId ( string $lexemeIdString)
private

◆ doesWrites()

Wikibase\Lexeme\MediaWiki\Specials\SpecialNewLexeme::doesWrites ( )

◆ execute()

Wikibase\Lexeme\MediaWiki\Specials\SpecialNewLexeme::execute ( $subPage)
Parameters
string | null$subPage

◆ extractLanguageCode()

Wikibase\Lexeme\MediaWiki\Specials\SpecialNewLexeme::extractLanguageCode ( EntityId $languageId)
private

◆ factory()

static Wikibase\Lexeme\MediaWiki\Specials\SpecialNewLexeme::factory ( LinkRenderer $linkRenderer,
StatsdDataFactoryInterface $statsDataFactory,
TempUserConfig $tempUserConfig,
AnonymousEditWarningBuilder $anonymousEditWarningBuilder,
MediaWikiEditEntityFactory $editEntityFactory,
EntityNamespaceLookup $entityNamespaceLookup,
EntityTitleStoreLookup $entityTitleLookup,
EntityLookup $entityLookup,
EntityIdParser $entityIdParser,
SettingsArray $repoSettings,
SummaryFormatter $summaryFormatter,
EntityIdFormatterFactory $entityIdFormatterFactory,
FallbackLabelDescriptionLookupFactory $labelDescriptionLookupFactory,
ValidatorErrorLocalizer $validatorErrorLocalizer,
LemmaTermValidator $lemmaTermValidator )
static

◆ getCopyrightHTML()

Wikibase\Lexeme\MediaWiki\Specials\SpecialNewLexeme::getCopyrightHTML ( )
private
Returns
string HTML

◆ getDescription()

Wikibase\Lexeme\MediaWiki\Specials\SpecialNewLexeme::getDescription ( )

◆ getFormFields()

Wikibase\Lexeme\MediaWiki\Specials\SpecialNewLexeme::getFormFields ( array $exampleLexemeParams)
private

◆ getGroupName()

Wikibase\Lexeme\MediaWiki\Specials\SpecialNewLexeme::getGroupName ( )
protected
See also
\Wikibase\Repo\Specials\SpecialWikibasePage::getGroupName()

◆ getItemIdLabelDesc()

Wikibase\Lexeme\MediaWiki\Specials\SpecialNewLexeme::getItemIdLabelDesc ( EntityId $itemId,
FallbackLabelDescriptionLookup $labelDescriptionLookup )
private

◆ getLexicalCategorySuggestions()

Wikibase\Lexeme\MediaWiki\Specials\SpecialNewLexeme::getLexicalCategorySuggestions ( )
private

Get the suggested lexical category items with their labels and descriptions.

Returns
array[]

◆ getUrlParamsForConfig()

Wikibase\Lexeme\MediaWiki\Specials\SpecialNewLexeme::getUrlParamsForConfig ( )
private

◆ newEditEntity()

Wikibase\Lexeme\MediaWiki\Specials\SpecialNewLexeme::newEditEntity ( )
private

◆ processInfoPanelTemplate()

Wikibase\Lexeme\MediaWiki\Specials\SpecialNewLexeme::processInfoPanelTemplate ( array $params)
private

◆ redirectToEntityPage()

Wikibase\Lexeme\MediaWiki\Specials\SpecialNewLexeme::redirectToEntityPage ( EditEntityStatus $status)
private

◆ saveEntity()

Wikibase\Lexeme\MediaWiki\Specials\SpecialNewLexeme::saveEntity ( EntityDocument $entity,
FormatableSummary $summary,
string $token )
private

◆ setHeaders()

Wikibase\Lexeme\MediaWiki\Specials\SpecialNewLexeme::setHeaders ( )

◆ termToArrayForJs()

static Wikibase\Lexeme\MediaWiki\Specials\SpecialNewLexeme::termToArrayForJs ( TermFallback $term)
staticprivate

Member Data Documentation

◆ $anonymousEditWarningBuilder

AnonymousEditWarningBuilder Wikibase\Lexeme\MediaWiki\Specials\SpecialNewLexeme::$anonymousEditWarningBuilder
private

◆ $copyrightView

SpecialPageCopyrightView Wikibase\Lexeme\MediaWiki\Specials\SpecialNewLexeme::$copyrightView
private

◆ $editEntityFactory

MediaWikiEditEntityFactory Wikibase\Lexeme\MediaWiki\Specials\SpecialNewLexeme::$editEntityFactory
private

◆ $entityIdFormatterFactory

EntityIdFormatterFactory Wikibase\Lexeme\MediaWiki\Specials\SpecialNewLexeme::$entityIdFormatterFactory
private

◆ $entityIdParser

EntityIdParser Wikibase\Lexeme\MediaWiki\Specials\SpecialNewLexeme::$entityIdParser
private

◆ $entityLookup

EntityLookup Wikibase\Lexeme\MediaWiki\Specials\SpecialNewLexeme::$entityLookup
private

◆ $entityNamespaceLookup

EntityNamespaceLookup Wikibase\Lexeme\MediaWiki\Specials\SpecialNewLexeme::$entityNamespaceLookup
private

◆ $entityTitleLookup

EntityTitleStoreLookup Wikibase\Lexeme\MediaWiki\Specials\SpecialNewLexeme::$entityTitleLookup
private

◆ $labelDescriptionLookupFactory

FallbackLabelDescriptionLookupFactory Wikibase\Lexeme\MediaWiki\Specials\SpecialNewLexeme::$labelDescriptionLookupFactory
private

◆ $lemmaTermValidator

LemmaTermValidator Wikibase\Lexeme\MediaWiki\Specials\SpecialNewLexeme::$lemmaTermValidator
private

◆ $linkRenderer

LinkRenderer Wikibase\Lexeme\MediaWiki\Specials\SpecialNewLexeme::$linkRenderer
private

◆ $statsDataFactory

StatsdDataFactoryInterface Wikibase\Lexeme\MediaWiki\Specials\SpecialNewLexeme::$statsDataFactory
private

◆ $summaryFormatter

SummaryFormatter Wikibase\Lexeme\MediaWiki\Specials\SpecialNewLexeme::$summaryFormatter
private

◆ $tags

array Wikibase\Lexeme\MediaWiki\Specials\SpecialNewLexeme::$tags
private

◆ $tempUserConfig

TempUserConfig Wikibase\Lexeme\MediaWiki\Specials\SpecialNewLexeme::$tempUserConfig
private

◆ $validatorErrorLocalizer

ValidatorErrorLocalizer Wikibase\Lexeme\MediaWiki\Specials\SpecialNewLexeme::$validatorErrorLocalizer
private

◆ FALLBACK_LANGUAGE_LABEL

const Wikibase\Lexeme\MediaWiki\Specials\SpecialNewLexeme::FALLBACK_LANGUAGE_LABEL = 'English'
private

◆ FALLBACK_LEXICAL_CATEGORY_LABEL

const Wikibase\Lexeme\MediaWiki\Specials\SpecialNewLexeme::FALLBACK_LEXICAL_CATEGORY_LABEL = 'verb'
private

◆ FIELD_LEMMA

const Wikibase\Lexeme\MediaWiki\Specials\SpecialNewLexeme::FIELD_LEMMA = 'lemma'

◆ FIELD_LEMMA_LANGUAGE

const Wikibase\Lexeme\MediaWiki\Specials\SpecialNewLexeme::FIELD_LEMMA_LANGUAGE = 'lemma-language'

◆ FIELD_LEXEME_LANGUAGE

const Wikibase\Lexeme\MediaWiki\Specials\SpecialNewLexeme::FIELD_LEXEME_LANGUAGE = 'lexeme-language'

◆ FIELD_LEXICAL_CATEGORY

const Wikibase\Lexeme\MediaWiki\Specials\SpecialNewLexeme::FIELD_LEXICAL_CATEGORY = 'lexicalcategory'

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