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

Page for creating new Wikibase properties. More...

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

Public Member Functions

 __construct (array $tags, SpecialPageCopyrightView $specialPageCopyrightView, EntityNamespaceLookup $entityNamespaceLookup, SummaryFormatter $summaryFormatter, EntityTitleLookup $entityTitleLookup, MediaWikiEditEntityFactory $editEntityFactory, AnonymousEditWarningBuilder $anonymousEditWarningBuilder, DataTypeFactory $dataTypeFactory, TermValidatorFactory $termValidatorFactory, TermsCollisionDetector $termsCollisionDetector, ValidatorErrorLocalizer $errorLocalizer, 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, DataTypeFactory $dataTypeFactory, MediaWikiEditEntityFactory $editEntityFactory, EntityNamespaceLookup $entityNamespaceLookup, EntityTitleLookup $entityTitleLookup, bool $isMobileView, TermsCollisionDetector $propertyTermsCollisionDetector, SettingsArray $repoSettings, SummaryFormatter $summaryFormatter, TermValidatorFactory $termValidatorFactory, ValidatorErrorLocalizer $errorLocalizer)
 

Public Attributes

const FIELD_LANG = 'lang'
 
const FIELD_DATATYPE = 'datatype'
 
const FIELD_LABEL = 'label'
 
const FIELD_DESCRIPTION = 'description'
 
const FIELD_ALIASES = 'aliases'
 

Protected Member Functions

 createEntityFromFormData (array $formData)
 
 getFormFields ()
 
 getLegend ()
 
Returns
string|Message $msg Legend for the fieldset, Message key or Message object

 
 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

 dataTypeExists (string $dataType)
 

Private Attributes

AnonymousEditWarningBuilder $anonymousEditWarningBuilder
 
 $dataTypeFactory
 
 $termValidatorFactory
 
 $termsCollisionDetector
 
 $errorLocalizer
 

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 properties.

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

Constructor & Destructor Documentation

◆ __construct()

Wikibase\Repo\Specials\SpecialNewProperty::__construct ( array $tags,
SpecialPageCopyrightView $specialPageCopyrightView,
EntityNamespaceLookup $entityNamespaceLookup,
SummaryFormatter $summaryFormatter,
EntityTitleLookup $entityTitleLookup,
MediaWikiEditEntityFactory $editEntityFactory,
AnonymousEditWarningBuilder $anonymousEditWarningBuilder,
DataTypeFactory $dataTypeFactory,
TermValidatorFactory $termValidatorFactory,
TermsCollisionDetector $termsCollisionDetector,
ValidatorErrorLocalizer $errorLocalizer,
bool $isMobileView )

Member Function Documentation

◆ createEntityFromFormData()

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

Reimplemented from Wikibase\Repo\Specials\SpecialNewEntity.

◆ dataTypeExists()

Wikibase\Repo\Specials\SpecialNewProperty::dataTypeExists ( string $dataType)
private

◆ displayBeforeForm()

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

◆ doesWrites()

Wikibase\Repo\Specials\SpecialNewProperty::doesWrites ( )
See also
SpecialNewEntity::doesWrites
Returns
bool

Reimplemented from Wikibase\Repo\Specials\SpecialNewEntity.

◆ factory()

static Wikibase\Repo\Specials\SpecialNewProperty::factory ( AnonymousEditWarningBuilder $anonymousEditWarningBuilder,
DataTypeFactory $dataTypeFactory,
MediaWikiEditEntityFactory $editEntityFactory,
EntityNamespaceLookup $entityNamespaceLookup,
EntityTitleLookup $entityTitleLookup,
bool $isMobileView,
TermsCollisionDetector $propertyTermsCollisionDetector,
SettingsArray $repoSettings,
SummaryFormatter $summaryFormatter,
TermValidatorFactory $termValidatorFactory,
ValidatorErrorLocalizer $errorLocalizer )
static

◆ getEntityType()

Wikibase\Repo\Specials\SpecialNewProperty::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\SpecialNewProperty::getFormFields ( )
protected
See also
SpecialNewEntity::getFormFields()
Returns
array[]

Reimplemented from Wikibase\Repo\Specials\SpecialNewEntity.

◆ getLegend()

Wikibase\Repo\Specials\SpecialNewProperty::getLegend ( )
protected

Returns
string|Message $msg Legend for the fieldset, Message key or Message object

Reimplemented from Wikibase\Repo\Specials\SpecialNewEntity.

◆ getWarnings()

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

Reimplemented from Wikibase\Repo\Specials\SpecialNewEntity.

◆ validateFormData()

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

Reimplemented from Wikibase\Repo\Specials\SpecialNewEntity.

Member Data Documentation

◆ $anonymousEditWarningBuilder

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

◆ $dataTypeFactory

Wikibase\Repo\Specials\SpecialNewProperty::$dataTypeFactory
private

◆ $errorLocalizer

Wikibase\Repo\Specials\SpecialNewProperty::$errorLocalizer
private

◆ $termsCollisionDetector

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

◆ $termValidatorFactory

Wikibase\Repo\Specials\SpecialNewProperty::$termValidatorFactory
private

◆ FIELD_ALIASES

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

◆ FIELD_DATATYPE

const Wikibase\Repo\Specials\SpecialNewProperty::FIELD_DATATYPE = 'datatype'

◆ FIELD_DESCRIPTION

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

◆ FIELD_LABEL

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

◆ FIELD_LANG

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

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