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

Static Public Member Functions

static newFromGlobalState ()
 

Private Member Functions

 getItemUrl (Title $title)
 Create a repo link directly to the item.
 
 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

◆ 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

◆ newFromGlobalState()

static Wikibase\Client\Hooks\MovePageNotice::newFromGlobalState ( )
static

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