Methods
getAllIds() → {Array.<number>}
#
getCategory() → {string}
#
Get NotificationItem category
Returns:
NotificationItem category
- Type
- string
getContentBody() → {string}
#
Get NotificationItem content body
Returns:
NotificationItem content body
- Type
- string
getContentHeader() → {string}
#
Get NotificationItem content header
Returns:
NotificationItem content
- Type
- string
getIconType() → {string}
#
Get the notification icon type
Returns:
Notification icon type
- Type
- string
getIconURL() → {string}
#
Get the notification icon URL
Returns:
Notification icon URL
- Type
- string
getId() → {string}
#
Get NotificationItem id
Returns:
NotificationItem Id
- Type
- string
getModelName() → {string}
#
Get the notification's model name
Returns:
Notification model name
- Type
- string
getPrimaryUrl() → {string}
#
Get the notification link
Returns:
Notification url
- Type
- string
getSecondaryUrls() → {Array.<Object>}
#
Get the notification's secondary links
Returns:
Secondary url definitions
getSource() → {string}
#
Get the notification's source
Returns:
Notification source
- Type
- string
getTimestamp() → {number}
#
Get the notification timestamp
Returns:
Notification timestamp in MediaWiki timestamp format
- Type
- number
getType() → {string}
#
Get NotificationItem type
Returns:
NotificationItem type
- Type
- string
isBundled() → {boolean}
#
Check whether this notification item is part of a bundle
Returns:
Notification item is part of a bundle
- Type
- boolean
isForeign() → {boolean}
#
Check whether this notification item is foreign
Returns:
Notification item is foreign
- Type
- boolean
isRead() → {boolean}
#
Check whether this notification item is read
Returns:
Notification item is read
- Type
- boolean
isSeen() → {boolean}
#
Check whether this notification item is seen
Returns:
Notification item is seen
- Type
- boolean
setForeign(isForeign)
#
Set this notification item as foreign
Parameters:
Name | Type | Description |
---|---|---|
isForeign |
boolean | Notification item is foreign |
setPrimaryUrl(link)
#
Set the notification link
Parameters:
Name | Type | Description |
---|---|---|
link |
string | Notification url |
setSecondaryUrls(links)
#
Set the notification's secondary links See constructor documentation for the structure of these links objects.
Parameters:
Set the notification's secondary links See constructor documentation for the structure of these links objects.
toggleRead([read])
#
Toggle the read state of the widget
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
read |
boolean |
optional |
The current read state. If not given, the state will become the opposite of its current state. |
Fires:
toggleSeen([seen])
#
Toggle the seen state of the widget
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
seen |
boolean |
optional |
The current seen state. If not given, the state will become the opposite of its current state. |
Fires:
Events
update()
#
Item details have changed or were updated