Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add documentation for event example properties #180

Open
romm opened this issue Jan 5, 2019 · 0 comments
Open

Add documentation for event example properties #180

romm opened this issue Jan 5, 2019 · 0 comments

Comments

@romm
Copy link
Member

romm commented Jan 5, 2019

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();
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant