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

Abstract special page for setting a value of a Wikibase entity. More...

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

Public Member Functions

 __construct ( $title, SpecialPageCopyrightView $copyrightView, SummaryFormatter $summaryFormatter, EntityTitleLookup $entityTitleLookup, MediawikiEditEntityFactory $editEntityFactory, EntityPermissionChecker $permissionChecker)
 
 doesWrites ()
 
- Public Member Functions inherited from Wikibase\Repo\Specials\SpecialModifyEntity
 __construct ( $title, SpecialPageCopyrightView $copyrightView, SummaryFormatter $summaryFormatter, EntityTitleLookup $entityTitleLookup, MediawikiEditEntityFactory $editEntityFactory)
 
 execute ( $subPage)
 
- Public Member Functions inherited from Wikibase\Repo\Specials\SpecialWikibaseRepoPage
 __construct ( $title, $restriction, SpecialPageCopyrightView $copyrightView, SummaryFormatter $summaryFormatter, EntityTitleLookup $entityTitleLookup, MediawikiEditEntityFactory $editEntityFactory)
 
- Public Member Functions inherited from Wikibase\Repo\Specials\SpecialWikibasePage
 __construct ( $name='', $restriction='', $listed=true)
 
 getDescription ()
 
 setHeaders ()
 

Protected Member Functions

 processArguments ( $subPage)
 
 validateInput ()
 
 modifyEntity (EntityDocument $entity)
 
 getForm (EntityDocument $entity=null)
 
 getPostedValue ()
 Returning the posted value of the request.
 
 getValue (EntityDocument $entity, $languageCode)
 Returning the value of the entity name by the given language.
 
 setValue (EntityDocument $entity, $languageCode, $value)
 Setting the value of the entity name by the given language.
 
- Protected Member Functions inherited from Wikibase\Repo\Specials\SpecialModifyEntity
 getEntityId ()
 Returns the ID of the Entity being modified.
 
 getBaseRevision ()
 Returns the base revision.
 
 getLatestRevision ()
 Returns the current revision.
 
 getEntityForModification ()
 Returns the EntityDocument that is to be modified by code in this class (or subclasses).
 
 getEntityForDisplay ()
 Returns the EntityDocument that is to be shown by code in this class (or subclasses).
 
 getFormElements (EntityDocument $entity=null)
 
 isModificationRequested ()
 Whether the current request is a request for modification (as opposed to a request for showing the input form).
 
 applyChangeOp (ChangeOp $changeOp, EntityDocument $entity, Summary $summary=null)
 Applies the given ChangeOp to the given Entity.
 
- 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.
 
 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

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

Private Member Functions

 checkSubPageLanguage ()
 Check the language given as sup page argument.
 
 checkTermChangePermissions (EntityId $entityId)
 
 setValueIfNull (EntityDocument $entity=null)
 

Private Attributes

 $languageCode
 
 $value
 
 $termsLanguages
 
 $permissionChecker
 

Detailed Description

Abstract special page for setting a value of a Wikibase entity.

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

Constructor & Destructor Documentation

◆ __construct()

Wikibase\Repo\Specials\SpecialModifyTerm::__construct (   $title,
SpecialPageCopyrightView  $copyrightView,
SummaryFormatter  $summaryFormatter,
EntityTitleLookup  $entityTitleLookup,
MediawikiEditEntityFactory  $editEntityFactory,
EntityPermissionChecker  $permissionChecker 
)
Parameters
string$titleThe title of the special page
SpecialPageCopyrightView$copyrightView
SummaryFormatter$summaryFormatter
EntityTitleLookup$entityTitleLookup
MediawikiEditEntityFactory$editEntityFactory
EntityPermissionChecker$permissionChecker

Member Function Documentation

◆ checkSubPageLanguage()

Wikibase\Repo\Specials\SpecialModifyTerm::checkSubPageLanguage ( )
private

Check the language given as sup page argument.

◆ checkTermChangePermissions()

Wikibase\Repo\Specials\SpecialModifyTerm::checkTermChangePermissions ( EntityId  $entityId)
private
Parameters
EntityId$entityId
Returns
Status

◆ doesWrites()

◆ getForm()

Wikibase\Repo\Specials\SpecialModifyTerm::getForm ( EntityDocument  $entity = null)
protected
See also
SpecialModifyEntity::getForm()
Parameters
EntityDocument | null$entity
Returns
HTMLForm

Reimplemented from Wikibase\Repo\Specials\SpecialModifyEntity.

◆ getPostedValue()

Wikibase\Repo\Specials\SpecialModifyTerm::getPostedValue ( )
abstractprotected

Returning the posted value of the request.

Returns
string|null

Reimplemented in Wikibase\Repo\Specials\SpecialSetAliases, Wikibase\Repo\Specials\SpecialSetDescription, and Wikibase\Repo\Specials\SpecialSetLabel.

◆ getValue()

Wikibase\Repo\Specials\SpecialModifyTerm::getValue ( EntityDocument  $entity,
  $languageCode 
)
abstractprotected

Returning the value of the entity name by the given language.

Parameters
EntityDocument$entity
string$languageCode
Returns
string

Reimplemented in Wikibase\Repo\Specials\SpecialSetAliases, Wikibase\Repo\Specials\SpecialSetDescription, and Wikibase\Repo\Specials\SpecialSetLabel.

◆ modifyEntity()

Wikibase\Repo\Specials\SpecialModifyTerm::modifyEntity ( EntityDocument  $entity)
protected
See also
SpecialModifyEntity::modifyEntity()
Parameters
EntityDocument$entity
Returns
Summary|bool

Reimplemented from Wikibase\Repo\Specials\SpecialModifyEntity.

◆ processArguments()

Wikibase\Repo\Specials\SpecialModifyTerm::processArguments (   $subPage)
protected
See also
SpecialModifyEntity::processArguments()
Parameters
string | null$subPage

Reimplemented from Wikibase\Repo\Specials\SpecialModifyEntity.

◆ setValue()

Wikibase\Repo\Specials\SpecialModifyTerm::setValue ( EntityDocument  $entity,
  $languageCode,
  $value 
)
abstractprotected

Setting the value of the entity name by the given language.

Parameters
EntityDocument$entity
string$languageCode
string$value
Returns
Summary

Reimplemented in Wikibase\Repo\Specials\SpecialSetAliases, Wikibase\Repo\Specials\SpecialSetDescription, and Wikibase\Repo\Specials\SpecialSetLabel.

◆ setValueIfNull()

Wikibase\Repo\Specials\SpecialModifyTerm::setValueIfNull ( EntityDocument  $entity = null)
private

◆ validateInput()

Wikibase\Repo\Specials\SpecialModifyTerm::validateInput ( )
protected

Member Data Documentation

◆ $languageCode

Wikibase\Repo\Specials\SpecialModifyTerm::$languageCode
private

◆ $permissionChecker

Wikibase\Repo\Specials\SpecialModifyTerm::$permissionChecker
private

◆ $termChangeOpFactory

Wikibase\Repo\Specials\SpecialModifyTerm::$termChangeOpFactory
protected

◆ $termsLanguages

Wikibase\Repo\Specials\SpecialModifyTerm::$termsLanguages
private

◆ $value

Wikibase\Repo\Specials\SpecialModifyTerm::$value
private

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