CuyZ/NotiZ

Add documentation for event example properties

Opened this issue · 0 comments

romm commented

See:

/**
* Interface that can be implemented by an event to give example properties that
* will be used in the backend module to show a preview of a notification bound
* to this event.
*
* Example:
*
* ```
* class MyEvent implements Event, ProvidesExampleProperties
* {
* protected $someValue;
*
* public function getExampleProperties()
* {
* return [
* 'someValue' => 'Some value example',
* ];
* }
* }
* ```
*/
interface ProvidesExampleProperties
{
/**
* Returns an array in which the key of an entry is the name of a property
* and its value is a human-readable example value.
*
* @return array
*/
public function getExampleProperties();
}