Wikibase
MediaWiki Wikibase extension
Wikibase\Client\Hooks\MovePageNotice Class Reference

Gets a notice about the Wikibase Item belonging to the current page after a move (in case there's one). More...

+ Inheritance diagram for Wikibase\Client\Hooks\MovePageNotice:
+ Collaboration diagram for Wikibase\Client\Hooks\MovePageNotice:

Public Member Functions

 __construct (SiteLinkLookup $siteLinkLookup, $siteId, RepoLinker $repoLinker)
 
 onSpecialMovepageAfterMove ( $movePage, $oldTitle, $newTitle)
 Hook for injecting a message on [[Special:MovePage]]. More...
 

Static Public Member Functions

static factory (RepoLinker $repoLinker, SettingsArray $clientSettings, ClientStore $store)
 

Private Member Functions

 getItemUrl (Title $title)
 Create a repo link directly to the item. More...
 
 getPageMoveNoticeHtml (Title $oldTitle, Title $newTitle)
 
 getPageMoveMessage (Title $newTitle)
 

Private Attributes

 $siteLinkLookup
 
 $siteId
 
 $repoLinker
 

Detailed Description

Gets a notice about the Wikibase Item belonging to the current page after a move (in case there's one).

Author
Marius Hoch < hoo@o.nosp@m.nlin.nosp@m.e.de >

Constructor & Destructor Documentation

◆ __construct()

Wikibase\Client\Hooks\MovePageNotice::__construct ( SiteLinkLookup  $siteLinkLookup,
  $siteId,
RepoLinker  $repoLinker 
)
Parameters
SiteLinkLookup$siteLinkLookup
string$siteIdGlobal id of the client wiki
RepoLinker$repoLinker

Member Function Documentation

◆ factory()

static Wikibase\Client\Hooks\MovePageNotice::factory ( RepoLinker  $repoLinker,
SettingsArray  $clientSettings,
ClientStore  $store 
)
static

◆ getItemUrl()

Wikibase\Client\Hooks\MovePageNotice::getItemUrl ( Title  $title)
private

Create a repo link directly to the item.

We can't use Special:ItemByTitle here as the item might have already been updated.

Parameters
Title$title
Returns
string|null

◆ getPageMoveMessage()

Wikibase\Client\Hooks\MovePageNotice::getPageMoveMessage ( Title  $newTitle)
private

◆ getPageMoveNoticeHtml()

Wikibase\Client\Hooks\MovePageNotice::getPageMoveNoticeHtml ( Title  $oldTitle,
Title  $newTitle 
)
private
Parameters
Title$oldTitleTitle of the page before the move
Title$newTitleTitle of the page after the move
Returns
string|null

◆ onSpecialMovepageAfterMove()

Wikibase\Client\Hooks\MovePageNotice::onSpecialMovepageAfterMove (   $movePage,
  $oldTitle,
  $newTitle 
)

Hook for injecting a message on [[Special:MovePage]].

See also
https://www.mediawiki.org/wiki/Manual:Hooks/SpecialMovepageAfterMove
Parameters
MovePageForm$movePage
Title$oldTitle
Title$newTitle

Member Data Documentation

◆ $repoLinker

Wikibase\Client\Hooks\MovePageNotice::$repoLinker
private

◆ $siteId

Wikibase\Client\Hooks\MovePageNotice::$siteId
private

◆ $siteLinkLookup

Wikibase\Client\Hooks\MovePageNotice::$siteLinkLookup
private

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