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

Handlers for client Echo notifications. More...

Public Member Functions

 __construct (RepoLinker $repoLinker, NamespaceChecker $namespaceChecker, $siteId, $sendEchoNotification, $repoSiteName)
 
 doLocalUserCreated (User $user, $autocreated)
 
 doWikibaseHandleChange (Change $change)
 

Static Public Member Functions

static newFromGlobalState ()
 
static onEchoGetBundleRules (EchoEvent $event, &$bundleString)
 Handler for EchoGetBundleRules hook.
 
static onLocalUserCreated (User $user, $autocreated)
 Handler for LocalUserCreated hook.
 
static onWikibaseHandleChange (Change $change)
 Handler for WikibaseHandleChange hook.
 

Public Attributes

const NOTIFICATION_TYPE = 'page-connection'
 Type of notification.
 

Private Member Functions

 getTitleForNotification (DiffOp $siteLinkDiffOp)
 Determines whether the change was a real sitelink addition and returns either title, or false.
 
 canNotifyForTitle (Title $title)
 Whether it's reasonable to send a notification for the title.
 

Private Attributes

 $repoLinker
 
 $namespaceChecker
 
 $siteId
 
 $sendEchoNotification
 
 $repoSiteName
 

Detailed Description

Handlers for client Echo notifications.

Author
Matěj Suchánek

Constructor & Destructor Documentation

◆ __construct()

Wikibase\Client\Hooks\EchoNotificationsHandlers::__construct ( RepoLinker  $repoLinker,
NamespaceChecker  $namespaceChecker,
  $siteId,
  $sendEchoNotification,
  $repoSiteName 
)
Parameters
RepoLinker$repoLinker
NamespaceChecker$namespaceChecker
string$siteId
bool$sendEchoNotification
string$repoSiteName

Member Function Documentation

◆ canNotifyForTitle()

Wikibase\Client\Hooks\EchoNotificationsHandlers::canNotifyForTitle ( Title  $title)
private

Whether it's reasonable to send a notification for the title.

Parameters
Title$title
Returns
bool

◆ doLocalUserCreated()

Wikibase\Client\Hooks\EchoNotificationsHandlers::doLocalUserCreated ( User  $user,
  $autocreated 
)
Parameters
User$user
bool$autocreated

◆ doWikibaseHandleChange()

Wikibase\Client\Hooks\EchoNotificationsHandlers::doWikibaseHandleChange ( Change  $change)
Parameters
Change$change
Returns
bool

◆ getTitleForNotification()

Wikibase\Client\Hooks\EchoNotificationsHandlers::getTitleForNotification ( DiffOp  $siteLinkDiffOp)
private

Determines whether the change was a real sitelink addition and returns either title, or false.

Parameters
DiffOp$siteLinkDiffOp
Returns
Title|false

◆ newFromGlobalState()

static Wikibase\Client\Hooks\EchoNotificationsHandlers::newFromGlobalState ( )
static
Returns
self

◆ onEchoGetBundleRules()

static Wikibase\Client\Hooks\EchoNotificationsHandlers::onEchoGetBundleRules ( EchoEvent  $event,
$bundleString 
)
static

Handler for EchoGetBundleRules hook.

See also
https://www.mediawiki.org/wiki/Notifications/Developer_guide#Bundled_notifications
Parameters
EchoEvent$event
string&$bundleString

◆ onLocalUserCreated()

static Wikibase\Client\Hooks\EchoNotificationsHandlers::onLocalUserCreated ( User  $user,
  $autocreated 
)
static

Handler for LocalUserCreated hook.

See also
https://www.mediawiki.org/wiki/Manual:Hooks/LocalUserCreated
Parameters
User$userUser object that was created.
bool$autocreatedTrue when account was auto-created

◆ onWikibaseHandleChange()

static Wikibase\Client\Hooks\EchoNotificationsHandlers::onWikibaseHandleChange ( Change  $change)
static

Handler for WikibaseHandleChange hook.

See also
doWikibaseHandleChange
Parameters
Change$change

Member Data Documentation

◆ $namespaceChecker

Wikibase\Client\Hooks\EchoNotificationsHandlers::$namespaceChecker
private

◆ $repoLinker

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

◆ $repoSiteName

Wikibase\Client\Hooks\EchoNotificationsHandlers::$repoSiteName
private

◆ $sendEchoNotification

Wikibase\Client\Hooks\EchoNotificationsHandlers::$sendEchoNotification
private

◆ $siteId

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

◆ NOTIFICATION_TYPE

const Wikibase\Client\Hooks\EchoNotificationsHandlers::NOTIFICATION_TYPE = 'page-connection'

Type of notification.


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