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

Handlers for client Echo notifications. More...

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

Public Member Functions

 __construct (RepoLinker $repoLinker, NamespaceChecker $namespaceChecker, RedirectLookup $redirectLookup, UserIdentityLookup $userIdentityLookup, UserOptionsManager $userOptionsManager, string $siteId, bool $sendEchoNotification, string $repoSiteName)
 
 onLocalUserCreated ( $user, $autocreated)
 Handler for LocalUserCreated hook.
 
 onWikibaseHandleChange (Change $change, array $rootJobParams=[])
 
 doWikibaseHandleChange (Change $change)
 
- Public Member Functions inherited from Wikibase\Client\Hooks\WikibaseHandleChangeHook
 onWikibaseHandleChange (EntityChange $change, array $rootJobParams=[])
 Called by () ChangeHandler::handleChanges() to allow alternative processing of changes.
 

Static Public Member Functions

static factory (RedirectLookup $redirectLookup, UserIdentityLookup $userIdentityLookup, UserOptionsManager $userOptionsManager, NamespaceChecker $namespaceChecker, RepoLinker $repoLinker, SettingsArray $settings)
 

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
 
 $redirectLookup
 
UserIdentityLookup $userIdentityLookup
 
 $userOptionsManager
 
 $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,
RedirectLookup $redirectLookup,
UserIdentityLookup $userIdentityLookup,
UserOptionsManager $userOptionsManager,
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

◆ doWikibaseHandleChange()

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

◆ factory()

static Wikibase\Client\Hooks\EchoNotificationsHandlers::factory ( RedirectLookup $redirectLookup,
UserIdentityLookup $userIdentityLookup,
UserOptionsManager $userOptionsManager,
NamespaceChecker $namespaceChecker,
RepoLinker $repoLinker,
SettingsArray $settings )
static

◆ 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

◆ onLocalUserCreated()

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

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()

Wikibase\Client\Hooks\EchoNotificationsHandlers::onWikibaseHandleChange ( Change $change,
array $rootJobParams = [] )

Member Data Documentation

◆ $namespaceChecker

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

◆ $redirectLookup

Wikibase\Client\Hooks\EchoNotificationsHandlers::$redirectLookup
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

◆ $userIdentityLookup

UserIdentityLookup Wikibase\Client\Hooks\EchoNotificationsHandlers::$userIdentityLookup
private

◆ $userOptionsManager

Wikibase\Client\Hooks\EchoNotificationsHandlers::$userOptionsManager
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: