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, SiteLinkPageNormalizer $siteLinkPageNormalizer, AnonymousEditWarningBuilder $anonymousEditWarningBuilder, TermValidatorFactory $termValidatorFactory, TermsCollisionDetector $termsCollisionDetector, ValidatorErrorLocalizer $errorLocalizer, SiteLinkTargetProvider $siteLinkTargetProvider, FallbackLabelDescriptionLookupFactory $labelDescriptionLookupFactory, array $badgeItems, 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 (AnonymousEditWarningBuilder $anonymousEditWarningBuilder, MediaWikiEditEntityFactory $editEntityFactory, EntityNamespaceLookup $entityNamespaceLookup, EntityTitleLookup $entityTitleLookup, FallbackLabelDescriptionLookupFactory $labelDescriptionLookupFactory, TermsCollisionDetector $itemTermsCollisionDetector, bool $isMobileView, SettingsArray $repoSettings, SiteLinkPageNormalizer $siteLinkPageNormalizer, 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'
 
const FIELD_BADGES = 'badges'
 

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.
 
 redirectToEntityPage (EditEntityStatus $status)
 Redirect to the page of the entity that was successfully edited.
 
- 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

SiteLinkPageNormalizer $siteLinkPageNormalizer
 
AnonymousEditWarningBuilder $anonymousEditWarningBuilder
 
TermValidatorFactory $termValidatorFactory
 
TermsCollisionDetector $termsCollisionDetector
 
ValidatorErrorLocalizer $errorLocalizer
 
SiteLinkTargetProvider $siteLinkTargetProvider
 
array $siteLinkGroups
 
FallbackLabelDescriptionLookupFactory $labelDescriptionLookupFactory
 
array $badgeItems
 

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,
SiteLinkPageNormalizer $siteLinkPageNormalizer,
AnonymousEditWarningBuilder $anonymousEditWarningBuilder,
TermValidatorFactory $termValidatorFactory,
TermsCollisionDetector $termsCollisionDetector,
ValidatorErrorLocalizer $errorLocalizer,
SiteLinkTargetProvider $siteLinkTargetProvider,
FallbackLabelDescriptionLookupFactory $labelDescriptionLookupFactory,
array $badgeItems,
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 ( AnonymousEditWarningBuilder $anonymousEditWarningBuilder,
MediaWikiEditEntityFactory $editEntityFactory,
EntityNamespaceLookup $entityNamespaceLookup,
EntityTitleLookup $entityTitleLookup,
FallbackLabelDescriptionLookupFactory $labelDescriptionLookupFactory,
TermsCollisionDetector $itemTermsCollisionDetector,
bool $isMobileView,
SettingsArray $repoSettings,
SiteLinkPageNormalizer $siteLinkPageNormalizer,
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

◆ $anonymousEditWarningBuilder

AnonymousEditWarningBuilder Wikibase\Repo\Specials\SpecialNewItem::$anonymousEditWarningBuilder
private

◆ $badgeItems

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

◆ $errorLocalizer

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

◆ $labelDescriptionLookupFactory

FallbackLabelDescriptionLookupFactory Wikibase\Repo\Specials\SpecialNewItem::$labelDescriptionLookupFactory
private

◆ $siteLinkGroups

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

◆ $siteLinkPageNormalizer

SiteLinkPageNormalizer Wikibase\Repo\Specials\SpecialNewItem::$siteLinkPageNormalizer
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_BADGES

const Wikibase\Repo\Specials\SpecialNewItem::FIELD_BADGES = 'badges'

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