-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FEATURE] Assign notification and event instances to email view (#176)
Two new variables become accessible in the template of an email: - `{notification}` β contains the notification instance - `{event}` β contains the event instance
- Loading branch information
Showing
3 changed files
with
104 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
.. include:: ../../Includes.txt | ||
|
||
PHP objects | ||
=========== | ||
|
||
.. _administrator-objects-notification: | ||
|
||
Notification | ||
------------ | ||
|
||
A notification implements the interface | ||
:php:`\CuyZ\Notiz\Core\Notification\Notification`, giving access to the methods | ||
below. | ||
|
||
.. tip:: | ||
|
||
Please note that depending on the type of the notification, even more | ||
methods can be available. | ||
|
||
.. container:: table-row | ||
|
||
Method | ||
:php:`Notification::getTitle()` | ||
Return type | ||
:php:`string` | ||
Description | ||
Returns the title of the notification. | ||
|
||
.. container:: table-row | ||
|
||
Method | ||
:php:`Notification::getNotificationDefinition()` | ||
Return type | ||
:php:`\CuyZ\Notiz\Core\Definition\Tree\Notification\NotificationDefinition` | ||
Description | ||
Returns the definition object of the notification. | ||
|
||
.. container:: table-row | ||
|
||
Method | ||
:php:`Notification::hasEventDefinition()` | ||
Return type | ||
:php:`bool` | ||
Description | ||
Returns whether the notification is bound to an event or not. | ||
|
||
.. container:: table-row | ||
|
||
Method | ||
:php:`Notification::getEventDefinition()` | ||
Return type | ||
:php:`\CuyZ\Notiz\Core\Definition\Tree\EventGroup\Event\EventDefinition` | ||
Description | ||
Returns the definition object of the event bound to the notification. | ||
If no event is bound, an exception is thrown. | ||
|
||
.. container:: table-row | ||
|
||
Method | ||
:php:`Notification::getEventConfiguration()` | ||
Return type | ||
:php:`array` | ||
Description | ||
Returns the configuration of the event. If no configuration is found, an | ||
empty array is returned. | ||
|
||
.. _administrator-objects-event: | ||
|
||
Event | ||
----- | ||
|
||
An event implements the interface :php:`\CuyZ\Notiz\Core\Event\Event`, giving | ||
access to the following methods: | ||
|
||
.. tip:: | ||
|
||
Please note that depending on the type of the event, even more methods can | ||
be available. | ||
|
||
.. container:: table-row | ||
|
||
Method | ||
:php:`Event::getDefinition()` | ||
Return type | ||
:php:`\CuyZ\Notiz\Core\Definition\Tree\EventGroup\Event\EventDefinition` | ||
Description | ||
Returns the definition object of the event. | ||
|
||
.. container:: table-row | ||
|
||
Method | ||
:php:`Event::getNotification()` | ||
Return type | ||
:php:`\CuyZ\Notiz\Core\Notification\Notification` | ||
Description | ||
Returns the notification that is being dispatched by this event. |