Wikibase
MediaWiki Wikibase extension
Loading...
Searching...
No Matches
Wikibase\Repo\Specials\SpecialNewItem Class Reference

Page for creating new Wikibase items. More...

+ Inheritance diagram for Wikibase\Repo\Specials\SpecialNewItem:
+ Collaboration diagram for Wikibase\Repo\Specials\SpecialNewItem:

Public Member Functions

 __construct (array $tags, SpecialPageCopyrightView $copyrightView, EntityNamespaceLookup $entityNamespaceLookup, SummaryFormatter $summaryFormatter, EntityTitleLookup $entityTitleLookup, MediaWikiEditEntityFactory $editEntityFactory, TermValidatorFactory $termValidatorFactory, TermsCollisionDetector $termsCollisionDetector, ValidatorErrorLocalizer $errorLocalizer, SiteLinkTargetProvider $siteLinkTargetProvider, array $siteLinkGroups, bool $isMobileView)
 
 doesWrites ()
 
- Public Member Functions inherited from Wikibase\Repo\Specials\SpecialNewEntity
 __construct ( $name, $restriction, array $tags, SpecialPageCopyrightView $copyrightView, EntityNamespaceLookup $entityNamespaceLookup, SummaryFormatter $summaryFormatter, EntityTitleLookup $entityTitleLookup, MediaWikiEditEntityFactory $editEntityFactory, bool $isMobileView)
 
 isListed ()
 
- Public Member Functions inherited from Wikibase\Repo\Specials\SpecialWikibaseRepoPage
 __construct ( $title, $restriction, array $tags, SpecialPageCopyrightView $copyrightView, SummaryFormatter $summaryFormatter, EntityTitleLookup $entityTitleLookup, MediaWikiEditEntityFactory $editEntityFactory)
 
- Public Member Functions inherited from Wikibase\Repo\Specials\SpecialWikibasePage
 __construct ( $name='', $restriction='', $listed=true)
 
 getDescription ()
 
 setHeaders ()
 
 execute ( $subPage)
 

Static Public Member Functions

static factory (MediaWikiEditEntityFactory $editEntityFactory, EntityNamespaceLookup $entityNamespaceLookup, EntityTitleLookup $entityTitleLookup, TermsCollisionDetector $itemTermsCollisionDetector, bool $isMobileView, SettingsArray $repoSettings, SiteLinkTargetProvider $siteLinkTargetProvider, SummaryFormatter $summaryFormatter, TermValidatorFactory $termValidatorFactory, ValidatorErrorLocalizer $errorLocalizer)
 

Public Attributes

const FIELD_LANG = 'lang'
 
const FIELD_LABEL = 'label'
 
const FIELD_DESCRIPTION = 'description'
 
const FIELD_ALIASES = 'aliases'
 
const FIELD_SITE = 'site'
 
const FIELD_PAGE = 'page'
 

Protected Member Functions

 createEntityFromFormData (array $formData)
 
 getFormFields ()
 
 getLegend ()
 
 getWarnings ()
 
 validateFormData (array $formData)
 
 displayBeforeForm (OutputPage $output)
 
 getEntityType ()
 
Returns
string Type id of the entity that will be created (eg: Item::ENTITY_TYPE value)

 
- Protected Member Functions inherited from Wikibase\Repo\Specials\SpecialNewEntity
 createSummary (EntityDocument $entity)
 
 getCopyrightHTML ( $messageKey=null)
 
- Protected Member Functions inherited from Wikibase\Repo\Specials\SpecialWikibaseRepoPage
 prepareEditEntity (EntityId $id=null, $baseRev=0)
 
 getEditEntity ()
 Returns the EditEntity interactor.
 
 parseEntityId ( $rawId)
 Parses an entity id.
 
 parseItemId ( $rawId)
 Parses an item id.
 
 getEntityTitle (EntityId $id)
 
 saveEntity (EntityDocument $entity, FormatableSummary $summary, $token, $flags=EDIT_UPDATE)
 Saves the entity using the given summary.
 
- Protected Member Functions inherited from Wikibase\Repo\Specials\SpecialWikibasePage
 getGroupName ()
 
 checkBlocked ()
 Checks if user is blocked, and if blocked throws a UserBlocked.
 
 showErrorHTML ( $error)
 

Private Member Functions

 getSiteLinkTargetSite (string $siteId)
 

Private Attributes

TermValidatorFactory $termValidatorFactory
 
TermsCollisionDetector $termsCollisionDetector
 
ValidatorErrorLocalizer $errorLocalizer
 
SiteLinkTargetProvider $siteLinkTargetProvider
 
array $siteLinkGroups
 

Additional Inherited Members

- Protected Attributes inherited from Wikibase\Repo\Specials\SpecialNewEntity
 $parts = null
 
 $entityNamespaceLookup
 
- Protected Attributes inherited from Wikibase\Repo\Specials\SpecialWikibaseRepoPage
 $summaryFormatter
 
- Protected Attributes inherited from Wikibase\Repo\Specials\SpecialWikibasePage
 $stringNormalizer
 

Detailed Description

Page for creating new Wikibase items.

Author
John Erling Blad < jebla.nosp@m.d@gm.nosp@m.ail.c.nosp@m.om >

Constructor & Destructor Documentation

◆ __construct()

Wikibase\Repo\Specials\SpecialNewItem::__construct ( array $tags,
SpecialPageCopyrightView $copyrightView,
EntityNamespaceLookup $entityNamespaceLookup,
SummaryFormatter $summaryFormatter,
EntityTitleLookup $entityTitleLookup,
MediaWikiEditEntityFactory $editEntityFactory,
TermValidatorFactory $termValidatorFactory,
TermsCollisionDetector $termsCollisionDetector,
ValidatorErrorLocalizer $errorLocalizer,
SiteLinkTargetProvider $siteLinkTargetProvider,
array $siteLinkGroups,
bool $isMobileView )

Member Function Documentation

◆ createEntityFromFormData()

Wikibase\Repo\Specials\SpecialNewItem::createEntityFromFormData ( array $formData)
protected
See also
SpecialNewEntity::createEntityFromFormData

Reimplemented from Wikibase\Repo\Specials\SpecialNewEntity.

◆ displayBeforeForm()

Wikibase\Repo\Specials\SpecialNewItem::displayBeforeForm ( OutputPage $output)
protected

◆ doesWrites()

Wikibase\Repo\Specials\SpecialNewItem::doesWrites ( )
See also
SpecialNewEntity::doesWrites

Reimplemented from Wikibase\Repo\Specials\SpecialNewEntity.

◆ factory()

static Wikibase\Repo\Specials\SpecialNewItem::factory ( MediaWikiEditEntityFactory $editEntityFactory,
EntityNamespaceLookup $entityNamespaceLookup,
EntityTitleLookup $entityTitleLookup,
TermsCollisionDetector $itemTermsCollisionDetector,
bool $isMobileView,
SettingsArray $repoSettings,
SiteLinkTargetProvider $siteLinkTargetProvider,
SummaryFormatter $summaryFormatter,
TermValidatorFactory $termValidatorFactory,
ValidatorErrorLocalizer $errorLocalizer )
static

◆ getEntityType()

Wikibase\Repo\Specials\SpecialNewItem::getEntityType ( )
protected

Returns
string Type id of the entity that will be created (eg: Item::ENTITY_TYPE value)

Reimplemented from Wikibase\Repo\Specials\SpecialNewEntity.

◆ getFormFields()

Wikibase\Repo\Specials\SpecialNewItem::getFormFields ( )
protected
Returns
array[]

Reimplemented from Wikibase\Repo\Specials\SpecialNewEntity.

◆ getLegend()

Wikibase\Repo\Specials\SpecialNewItem::getLegend ( )
protected
Returns
string|Message $msg Legend for the fieldset, Message key or Message object

Reimplemented from Wikibase\Repo\Specials\SpecialNewEntity.

◆ getSiteLinkTargetSite()

Wikibase\Repo\Specials\SpecialNewItem::getSiteLinkTargetSite ( string $siteId)
private

◆ getWarnings()

Wikibase\Repo\Specials\SpecialNewItem::getWarnings ( )
protected
See also
SpecialNewEntity::getWarnings
Returns
string[]

Reimplemented from Wikibase\Repo\Specials\SpecialNewEntity.

◆ validateFormData()

Wikibase\Repo\Specials\SpecialNewItem::validateFormData ( array $formData)
protected
Parameters
array$formData
Returns
Status

Reimplemented from Wikibase\Repo\Specials\SpecialNewEntity.

Member Data Documentation

◆ $errorLocalizer

ValidatorErrorLocalizer Wikibase\Repo\Specials\SpecialNewItem::$errorLocalizer
private

◆ $siteLinkGroups

array Wikibase\Repo\Specials\SpecialNewItem::$siteLinkGroups
private

◆ $siteLinkTargetProvider

SiteLinkTargetProvider Wikibase\Repo\Specials\SpecialNewItem::$siteLinkTargetProvider
private

◆ $termsCollisionDetector

TermsCollisionDetector Wikibase\Repo\Specials\SpecialNewItem::$termsCollisionDetector
private

◆ $termValidatorFactory

TermValidatorFactory Wikibase\Repo\Specials\SpecialNewItem::$termValidatorFactory
private

◆ FIELD_ALIASES

const Wikibase\Repo\Specials\SpecialNewItem::FIELD_ALIASES = 'aliases'

◆ FIELD_DESCRIPTION

const Wikibase\Repo\Specials\SpecialNewItem::FIELD_DESCRIPTION = 'description'

◆ FIELD_LABEL

const Wikibase\Repo\Specials\SpecialNewItem::FIELD_LABEL = 'label'

◆ FIELD_LANG

const Wikibase\Repo\Specials\SpecialNewItem::FIELD_LANG = 'lang'

◆ FIELD_PAGE

const Wikibase\Repo\Specials\SpecialNewItem::FIELD_PAGE = 'page'

◆ FIELD_SITE

const Wikibase\Repo\Specials\SpecialNewItem::FIELD_SITE = 'site'

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