eef427a8cd6bc775a447678df1f1d1f7c024553a
[GitHub/WoltLab/woltlab.github.io.git] / docs / package / pip / user-notification-event.md
1 # User Notification Event Package Installation Plugin
2
3 Registers new user notification events.
4
5 ## Components
6
7 Each package installation plugin is described as an `<event>` element with the mandatory child `<name>`.
8
9 ### `<objectType>`
10
11 !!! warning "The `(name, objectType)` pair must be unique."
12
13 The given object type must implement the `com.woltlab.wcf.notification.objectType` definition.
14
15 ### `<classname>`
16
17 The name of the class providing the event's behaviour,
18 the class has to implement the `wcf\system\user\notification\event\IUserNotificationEvent` interface.
19
20 ### `<preset>`
21
22 Defines whether this event is enabled by default.
23
24 ### `<presetmailnotificationtype>`
25
26 !!! info "Avoid using this option, as sending unsolicited mail can be seen as spamming."
27
28 One of `instant` or `daily`.
29 Defines whether this type of email notifications is enabled by default.
30
31 ### `<options>`
32
33 <span class="label label-info">Optional</span>
34
35 The options element can contain a comma-separated list of options of which at least one needs to be enabled for the notification type to be available.
36
37 ### `<permissions>`
38
39 <span class="label label-info">Optional</span>
40
41 The permissions element can contain a comma-separated list of permissions of which the active user needs to have at least one for the notification type to be available.
42
43 ## Example
44
45 {jinja{ codebox(
46 "xml",
47 "package/pip/userNotificationEvent.xml",
48 "userNotificationEvent.xml"
49 ) }}