Wikibase
MediaWiki Wikibase extension
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 (SpecialPageCopyrightView $copyrightView, EntityNamespaceLookup $entityNamespaceLookup, SummaryFormatter $summaryFormatter, EntityTitleLookup $entityTitleLookup, MediawikiEditEntityFactory $editEntityFactory, SiteLookup $siteLookup, TermValidatorFactory $termValidatorFactory, TermsCollisionDetector $termsCollisionDetector)
 
 doesWrites ()
 
- Public Member Functions inherited from Wikibase\Repo\Specials\SpecialNewEntity
 __construct ( $name, $restriction, SpecialPageCopyrightView $copyrightView, EntityNamespaceLookup $entityNamespaceLookup, SummaryFormatter $summaryFormatter, EntityTitleLookup $entityTitleLookup, MediawikiEditEntityFactory $editEntityFactory)
 
 isListed ()
 
- Public Member Functions inherited from Wikibase\Repo\Specials\SpecialWikibaseRepoPage
 __construct ( $title, $restriction, 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 (SiteLookup $siteLookup, MediawikiEditEntityFactory $editEntityFactory, EntityNamespaceLookup $entityNamespaceLookup, EntityTitleLookup $entityTitleLookup, TermsCollisionDetector $itemTermsCollisionDetector, SettingsArray $repoSettings, SummaryFormatter $summaryFormatter, TermValidatorFactory $termValidatorFactory)
 

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)
More...
 
- 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. More...
 
 parseEntityId ( $rawId)
 Parses an entity id. More...
 
 parseItemId ( $rawId)
 Parses an item id. More...
 
 getEntityTitle (EntityId $id)
 
 saveEntity (EntityDocument $entity, FormatableSummary $summary, $token, $flags=EDIT_UPDATE)
 Saves the entity using the given summary. More...
 
- Protected Member Functions inherited from Wikibase\Repo\Specials\SpecialWikibasePage
 getGroupName ()
 
 checkBlocked ()
 Checks if user is blocked, and if blocked throws a UserBlocked. More...
 
 showErrorHTML ( $error)
 

Private Member Functions

 createStatusFromValidatorError ( $error)
 

Private Attributes

 $siteLookup
 
 $termValidatorFactory
 
 $termsCollisionDetector
 

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 ( SpecialPageCopyrightView  $copyrightView,
EntityNamespaceLookup  $entityNamespaceLookup,
SummaryFormatter  $summaryFormatter,
EntityTitleLookup  $entityTitleLookup,
MediawikiEditEntityFactory  $editEntityFactory,
SiteLookup  $siteLookup,
TermValidatorFactory  $termValidatorFactory,
TermsCollisionDetector  $termsCollisionDetector 
)

Member Function Documentation

◆ createEntityFromFormData()

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

Reimplemented from Wikibase\Repo\Specials\SpecialNewEntity.

◆ createStatusFromValidatorError()

Wikibase\Repo\Specials\SpecialNewItem::createStatusFromValidatorError (   $error)
private

◆ displayBeforeForm()

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

◆ doesWrites()

Wikibase\Repo\Specials\SpecialNewItem::doesWrites ( )

◆ factory()

static Wikibase\Repo\Specials\SpecialNewItem::factory ( SiteLookup  $siteLookup,
MediawikiEditEntityFactory  $editEntityFactory,
EntityNamespaceLookup  $entityNamespaceLookup,
EntityTitleLookup  $entityTitleLookup,
TermsCollisionDetector  $itemTermsCollisionDetector,
SettingsArray  $repoSettings,
SummaryFormatter  $summaryFormatter,
TermValidatorFactory  $termValidatorFactory 
)
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
See also
SpecialNewEntity::getLegend
Returns
string|Message $msg Message key or Message object

Reimplemented from Wikibase\Repo\Specials\SpecialNewEntity.

◆ 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

◆ $siteLookup

Wikibase\Repo\Specials\SpecialNewItem::$siteLookup
private

◆ $termsCollisionDetector

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

◆ $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: