Wikibase
MediaWiki Wikibase extension
Loading...
Searching...
No Matches
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, bool $isMobileView)
 
 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.
 
 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)
 

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 ()
 

Private Attributes

bool $isMobileView
 

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,
bool $isMobileView )
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\SpecialNewItem, and Wikibase\Repo\Specials\SpecialNewProperty.

◆ 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\SpecialNewItem, and Wikibase\Repo\Specials\SpecialNewProperty.

◆ 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\SpecialNewItem, and Wikibase\Repo\Specials\SpecialNewProperty.

◆ 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\SpecialNewItem, and Wikibase\Repo\Specials\SpecialNewProperty.

◆ getWarnings()

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

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

◆ 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\SpecialNewItem, and Wikibase\Repo\Specials\SpecialNewProperty.

Member Data Documentation

◆ $entityNamespaceLookup

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

◆ $isMobileView

bool Wikibase\Repo\Specials\SpecialNewEntity::$isMobileView
private

◆ $parts

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

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