Add documentation for event example properties
Opened this issue · 0 comments
romm commented
See:
NotiZ/Classes/Core/Event/Support/ProvidesExampleProperties.php
Lines 19 to 49 in af8cb88
/** | |
* 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(); | |
} |