Wikibase
MediaWiki Wikibase extension
Wikibase\Repo\Specials\SpecialNewEntity Class Reference

Page for creating new Wikibase entities that contain a Fingerprint. More...

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

Public Member Functions

 __construct ( $name, $restriction, array $tags, SpecialPageCopyrightView $copyrightView, EntityNamespaceLookup $entityNamespaceLookup, SummaryFormatter $summaryFormatter, EntityTitleLookup $entityTitleLookup, MediawikiEditEntityFactory $editEntityFactory)
 
 doesWrites ()
 
 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)
 

Protected Member Functions

 getEntityType ()
 
 getFormFields ()
 
 getLegend ()
 
 getWarnings ()
 
 createEntityFromFormData (array $formData)
 
 validateFormData (array $formData)
 
 createSummary (EntityDocument $entity)
 
 displayBeforeForm (OutputPage $output)
 
 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)
 

Protected Attributes

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

Private Member Functions

 createForm ()
 
 redirectToEntityPage (EntityDocument $entity)
 
 checkBlockedOnNamespace ()
 

Detailed Description

Page for creating new Wikibase entities that contain a Fingerprint.

Constructor & Destructor Documentation

◆ __construct()

Wikibase\Repo\Specials\SpecialNewEntity::__construct (   $name,
  $restriction,
array  $tags,
SpecialPageCopyrightView  $copyrightView,
EntityNamespaceLookup  $entityNamespaceLookup,
SummaryFormatter  $summaryFormatter,
EntityTitleLookup  $entityTitleLookup,
MediawikiEditEntityFactory  $editEntityFactory 
)
Parameters
string$nameName of the special page, as seen in links and URLs.
string$restrictionUser right required,
string[]$tagsList of tags to add to edits
SpecialPageCopyrightView$copyrightView
EntityNamespaceLookup$entityNamespaceLookup
SummaryFormatter$summaryFormatter
EntityTitleLookup$entityTitleLookup
MediawikiEditEntityFactory$editEntityFactory

Member Function Documentation

◆ checkBlockedOnNamespace()

Wikibase\Repo\Specials\SpecialNewEntity::checkBlockedOnNamespace ( )
private
Exceptions
UserBlockedError

◆ createEntityFromFormData()

Wikibase\Repo\Specials\SpecialNewEntity::createEntityFromFormData ( array  $formData)
abstractprotected
Parameters
array$formData
Returns
EntityDocument

Reimplemented in Wikibase\Repo\Specials\SpecialNewProperty, and Wikibase\Repo\Specials\SpecialNewItem.

◆ createForm()

Wikibase\Repo\Specials\SpecialNewEntity::createForm ( )
private
Returns
HTMLForm

◆ createSummary()

Wikibase\Repo\Specials\SpecialNewEntity::createSummary ( EntityDocument  $entity)
abstractprotected
Parameters
EntityDocument$entity
Returns
Summary

◆ displayBeforeForm()

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

◆ doesWrites()

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

Reimplemented in Wikibase\Repo\Specials\SpecialNewProperty, and Wikibase\Repo\Specials\SpecialNewItem.

◆ getCopyrightHTML()

Wikibase\Repo\Specials\SpecialNewEntity::getCopyrightHTML (   $messageKey = null)
protected
Parameters
string | null$messageKeyignored here
Returns
string HTML

Reimplemented from Wikibase\Repo\Specials\SpecialWikibaseRepoPage.

◆ getEntityType()

Wikibase\Repo\Specials\SpecialNewEntity::getEntityType ( )
abstractprotected
Returns
string Type id of the entity that will be created (eg: Item::ENTITY_TYPE value)

Reimplemented in Wikibase\Repo\Specials\SpecialNewProperty, and Wikibase\Repo\Specials\SpecialNewItem.

◆ getFormFields()

Wikibase\Repo\Specials\SpecialNewEntity::getFormFields ( )
abstractprotected

◆ getLegend()

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

Reimplemented in Wikibase\Repo\Specials\SpecialNewProperty, and Wikibase\Repo\Specials\SpecialNewItem.

◆ getWarnings()

Wikibase\Repo\Specials\SpecialNewEntity::getWarnings ( )
abstractprotected
Returns
string[] Warnings that should be presented to the user

Reimplemented in Wikibase\Repo\Specials\SpecialNewProperty, and Wikibase\Repo\Specials\SpecialNewItem.

◆ isListed()

Wikibase\Repo\Specials\SpecialNewEntity::isListed ( )

◆ redirectToEntityPage()

Wikibase\Repo\Specials\SpecialNewEntity::redirectToEntityPage ( EntityDocument  $entity)
private

◆ validateFormData()

Wikibase\Repo\Specials\SpecialNewEntity::validateFormData ( array  $formData)
abstractprotected
Parameters
array$formData
Returns
Status

Reimplemented in Wikibase\Repo\Specials\SpecialNewProperty, and Wikibase\Repo\Specials\SpecialNewItem.

Member Data Documentation

◆ $entityNamespaceLookup

Wikibase\Repo\Specials\SpecialNewEntity::$entityNamespaceLookup
protected

◆ $parts

Wikibase\Repo\Specials\SpecialNewEntity::$parts = null
protected

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