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

Abstract base class for special pages of the WikibaseRepo extension. More...

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

Public Member Functions

 __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

 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...
 
 getCopyrightHTML ( $saveMessageKey=null)
 
- 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

 $summaryFormatter
 
- Protected Attributes inherited from Wikibase\Repo\Specials\SpecialWikibasePage
 $stringNormalizer
 

Private Attributes

 $tags
 
 $copyrightView
 
 $entityTitleLookup
 
 $editEntityFactory
 
 $editEntity = null
 

Detailed Description

Abstract base class for special pages of the WikibaseRepo extension.

Author
Bene* < benes.nosp@m.tar..nosp@m.wikim.nosp@m.edia.nosp@m.@gmai.nosp@m.l.co.nosp@m.m >

Constructor & Destructor Documentation

◆ __construct()

Wikibase\Repo\Specials\SpecialWikibaseRepoPage::__construct (   $title,
  $restriction,
array  $tags,
SpecialPageCopyrightView  $copyrightView,
SummaryFormatter  $summaryFormatter,
EntityTitleLookup  $entityTitleLookup,
MediawikiEditEntityFactory  $editEntityFactory 
)
Parameters
string$titleThe title of the special page
string$restrictionThe required user right
string[]$tagsList of tags to add to edits
SpecialPageCopyrightView$copyrightView
SummaryFormatter$summaryFormatter
EntityTitleLookup$entityTitleLookup
MediawikiEditEntityFactory$editEntityFactory

Member Function Documentation

◆ getCopyrightHTML()

Wikibase\Repo\Specials\SpecialWikibaseRepoPage::getCopyrightHTML (   $saveMessageKey = null)
protected
Parameters
string | null$saveMessageKeyDefaults to "wikibase-<special page name>-submit".
Returns
string HTML

Reimplemented in Wikibase\Repo\Specials\SpecialNewEntity.

◆ getEditEntity()

Wikibase\Repo\Specials\SpecialWikibaseRepoPage::getEditEntity ( )
protected

Returns the EditEntity interactor.

Note
Call only after calling prepareEditEntity() first.
Returns
EditEntity

◆ getEntityTitle()

Wikibase\Repo\Specials\SpecialWikibaseRepoPage::getEntityTitle ( EntityId  $id)
protected
Parameters
EntityId$id
Exceptions
MWException
Returns
null|Title

◆ parseEntityId()

Wikibase\Repo\Specials\SpecialWikibaseRepoPage::parseEntityId (   $rawId)
protected

Parses an entity id.

Parameters
string$rawId
Returns
EntityId
Exceptions
UserInputException

◆ parseItemId()

Wikibase\Repo\Specials\SpecialWikibaseRepoPage::parseItemId (   $rawId)
protected

Parses an item id.

Parameters
string$rawId
Returns
ItemId
Exceptions
UserInputException

◆ prepareEditEntity()

Wikibase\Repo\Specials\SpecialWikibaseRepoPage::prepareEditEntity ( EntityId  $id = null,
  $baseRev = 0 
)
protected
Parameters
EntityId | null$id
int$baseRev
Returns
EditEntity

◆ saveEntity()

Wikibase\Repo\Specials\SpecialWikibaseRepoPage::saveEntity ( EntityDocument  $entity,
FormatableSummary  $summary,
  $token,
  $flags = EDIT_UPDATE 
)
protected

Saves the entity using the given summary.

Note
Call prepareEditEntity() first.
Parameters
EntityDocument$entity
FormatableSummary$summary
string$token
int$flagsThe edit flags (see WikiPage::doEditContent)
Returns
Status

Member Data Documentation

◆ $copyrightView

Wikibase\Repo\Specials\SpecialWikibaseRepoPage::$copyrightView
private

◆ $editEntity

Wikibase\Repo\Specials\SpecialWikibaseRepoPage::$editEntity = null
private

◆ $editEntityFactory

Wikibase\Repo\Specials\SpecialWikibaseRepoPage::$editEntityFactory
private

◆ $entityTitleLookup

Wikibase\Repo\Specials\SpecialWikibaseRepoPage::$entityTitleLookup
private

◆ $summaryFormatter

Wikibase\Repo\Specials\SpecialWikibaseRepoPage::$summaryFormatter
protected

◆ $tags

Wikibase\Repo\Specials\SpecialWikibaseRepoPage::$tags
private

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