Wikibase
MediaWiki Wikibase extension
Loading...
Searching...
No Matches
Wikibase\Client\Hooks\DeletePageNoticeCreator Class Reference

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

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

Public Member Functions

 __construct (SiteLinkLookup $siteLinkLookup, string $siteId, RepoLinker $repoLinker)
 
 onArticleDeleteAfterSuccess ( $title, $outputPage)
 
 getPageDeleteNoticeHtml (Title $title)
 

Static Public Member Functions

static newFromGlobalState ()
 

Private Member Functions

 getItemUrl (Title $title)
 Create a repo link directly to the item.
 
 getMessage (Title $title)
 

Private Attributes

 $siteLinkLookup
 
 $siteId
 
 $repoLinker
 

Detailed Description

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

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

Constructor & Destructor Documentation

◆ __construct()

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

Member Function Documentation

◆ getItemUrl()

Wikibase\Client\Hooks\DeletePageNoticeCreator::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

◆ getMessage()

Wikibase\Client\Hooks\DeletePageNoticeCreator::getMessage ( Title  $title)
private

◆ getPageDeleteNoticeHtml()

Wikibase\Client\Hooks\DeletePageNoticeCreator::getPageDeleteNoticeHtml ( Title  $title)
Parameters
Title$title
Returns
string|null

◆ newFromGlobalState()

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

◆ onArticleDeleteAfterSuccess()

Wikibase\Client\Hooks\DeletePageNoticeCreator::onArticleDeleteAfterSuccess (   $title,
  $outputPage 
)
Parameters
Title$title
OutputPage$outputPage

Member Data Documentation

◆ $repoLinker

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

◆ $siteId

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

◆ $siteLinkLookup

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

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