Wikibase
MediaWiki Wikibase extension
Loading...
Searching...
No Matches
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.
 
 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.
 
 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.
 
 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
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

◆ redirectToEntityPage()

Wikibase\Repo\Specials\SpecialWikibaseRepoPage::redirectToEntityPage ( EditEntityStatus $status)
protected

Redirect to the page of the entity that was successfully edited.

Parameters
EditEntityStatus$statusA status as returned by self::saveEntity(). The status must be OK.

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

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: