-
Notifications
You must be signed in to change notification settings - Fork 44
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
[Example] Dispatch domain events for albums #95
base: master
Are you sure you want to change the base?
Conversation
b1fe906
to
e5f2299
Compare
"app.select_album": "Select album", | ||
"sulu_activity.description.albums.created": "{userFullName} has created the album \"{resourceTitle}\"", | ||
"sulu_activity.description.albums.modified": "{userFullName} has changed the album \"{resourceTitle}\"", | ||
"sulu_activity.description.albums.removed": "{userFullName} has removed the album \"{resourceTitle}\"" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These translation keys consist of sulu_activity.description
as fixed part, the resourceKey
(albums
) and the eventType
(removed
).
The available translation parameters can be found here.
To use variables of the context
, you have to use context_myVar
.
|
||
public function getEventPayload(): ?array | ||
{ | ||
return $this->payload; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By configuring sulu_activity.storage.persist_payload
to true
in config/packages/sulu_activity.yaml
, the event payload will be persisted in the database too.
e5f2299
to
ed3253d
Compare
think a good hint for that example is, that you need Sulu |
Yes, good hint, but the |
What's in this PR?
This pull request shows, how to dispatch domain events for custom entities and show them in the administration interface in a separate tab on the edit view of your custom entity.
Requirements