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 (bool $isMobileView, SiteLinkLookup $siteLinkLookup, string $siteId, RepoLinker $repoLinker)
 
 onSpecialMovepageAfterMove ( $movePage, $oldTitle, $newTitle)
 Hook for injecting a message on [[Special:MovePage]].
 

Static Public Member Functions

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

Private Member Functions

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

Private Attributes

bool $isMobileView
 
SiteLinkLookup $siteLinkLookup
 
string $siteId
 
RepoLinker $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 ( bool $isMobileView,
SiteLinkLookup $siteLinkLookup,
string $siteId,
RepoLinker $repoLinker )
Parameters
bool$isMobileView
SiteLinkLookup$siteLinkLookup
string$siteIdGlobal id of the client wiki
RepoLinker$repoLinker

Member Function Documentation

◆ factory()

static Wikibase\Client\Hooks\MovePageNotice::factory ( bool $isMobileView,
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.

◆ 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

◆ 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
SpecialMovePage$movePage
Title$oldTitle
Title$newTitle

Member Data Documentation

◆ $isMobileView

bool Wikibase\Client\Hooks\MovePageNotice::$isMobileView
private

◆ $repoLinker

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

◆ $siteId

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

◆ $siteLinkLookup

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

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