Notification extends Base
Table of Contents
Constants
Methods
- __construct() : mixed
- checkDisableFeature() : bool
- decodeSettings() : array<string|int, mixed>
- Converts a flat array of templates into an array of notification schemes
- encodeSettings() : array<string|int, mixed>
- Converts notification settings into a flat array, in which the key is a template, and the value is the value of the setting
- filterAllowedUsers() : array<string|int, mixed>
- Filters the list of users to whom can send a notification
- getDefaultFeature() : bool
- getDefaultSettings() : array<string|int, mixed>
- The method get the full notification scheme (from all modules)
- getEventNames() : array<string|int, mixed>
- getGroupSettings() : array<string|int, mixed>
- Gets the group's notification settings
- getLifetime() : int
- getSimpleNotifySettings() : array<string|int, mixed>
- getUserSettings() : array<string|int, mixed>
- Gets the user's notification settings
- getValue() : bool
- isAllowed() : bool
- Determines whether a notification can be sent to the user
- setModule() : void
- setName() : void
- setSettings() : void
- Sets the group's notification settings
- updateGroupSettings() : void
- Updates the group's notification settings
Constants
public
mixed
MAIL
= 'mail'
PUSH
public
mixed
PUSH
= 'push'
SITE
public
mixed
SITE
= 'site'
XMPP
public
mixed
XMPP
= 'xmpp'
Methods
__construct()
public
__construct(string $module, string $name) : mixed
Parameters
- $module : string
- $name : string
checkDisableFeature()
public
checkDisableFeature(string $feature) : bool
Parameters
- $feature : string
Return values
booldecodeSettings()
Converts a flat array of templates into an array of notification schemes
public
static decodeSettings(array<string|int, mixed> $rowSettings) : array<string|int, mixed>
Parameters
- $rowSettings : array<string|int, mixed>
Return values
array<string|int, mixed>encodeSettings()
Converts notification settings into a flat array, in which the key is a template, and the value is the value of the setting
public
static encodeSettings(array<string|int, mixed> $settings) : array<string|int, mixed>
Parameters
- $settings : array<string|int, mixed>
Return values
array<string|int, mixed>filterAllowedUsers()
Filters the list of users to whom can send a notification
public
filterAllowedUsers(array<string|int, mixed> $userList, string $type) : array<string|int, mixed>
Parameters
- $userList : array<string|int, mixed>
- $type : string
Tags
Return values
array<string|int, mixed>getDefaultFeature()
public
getDefaultFeature(string $feature) : bool
Parameters
- $feature : string
Return values
boolgetDefaultSettings()
The method get the full notification scheme (from all modules)
public
static getDefaultSettings() : array<string|int, mixed>
Return values
array<string|int, mixed>getEventNames()
public
static getEventNames() : array<string|int, mixed>
Return values
array<string|int, mixed>getGroupSettings()
Gets the group's notification settings
public
static getGroupSettings(int $groupId) : array<string|int, mixed>
Parameters
- $groupId : int
Tags
Return values
array<string|int, mixed>getLifetime()
public
getLifetime() : int
Return values
intgetSimpleNotifySettings()
public
static getSimpleNotifySettings(array<string|int, mixed> $generalSettings) : array<string|int, mixed>
Parameters
- $generalSettings : array<string|int, mixed>
Return values
array<string|int, mixed>getUserSettings()
Gets the user's notification settings
public
static getUserSettings(int $userId) : array<string|int, mixed>
Parameters
- $userId : int
Tags
Return values
array<string|int, mixed>getValue()
public
getValue(int $userId, string $type) : bool
Parameters
- $userId : int
- $type : string
Return values
boolisAllowed()
Determines whether a notification can be sent to the user
public
isAllowed(int $userId, string $type) : bool
Parameters
- $userId : int
- $type : string
Tags
Return values
boolsetModule()
public
setModule(string $module) : void
Parameters
- $module : string
setName()
public
setName(string $name) : void
Parameters
- $name : string
setSettings()
Sets the group's notification settings
public
static setSettings(int $groupId[, array<string|int, mixed> $settings = [] ][, bool $forInitialize = false ]) : void
Parameters
- $groupId : int
- $settings : array<string|int, mixed> = []
- $forInitialize : bool = false
Tags
updateGroupSettings()
Updates the group's notification settings
public
static updateGroupSettings(int $groupId, array<string|int, mixed> $settings) : void
Parameters
- $groupId : int
- $settings : array<string|int, mixed>