Event Listener for Specific Data Object Classes #16928
Answered
by
markus-moser
cancan101
asked this question in
Q&A / Support
-
Is there any way to define an Right now I have:
and then I need to do an public function onPreUpdate(DataObjectEvent $e){
if ($e->getObject() instanceof DataObject\Product){
// ...
}
} however for for Workflows I am able to do:
where I can subscribe to a specific workflow. |
Beta Was this translation helpful? Give feedback.
Answered by
markus-moser
Apr 12, 2024
Replies: 1 comment
-
There are no data object class specific events so you need to do it with the instanceof approach. For workflows there are more fine-grained events as it is based on the Symfony workflow engine which offers these kind of events. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
cancan101
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There are no data object class specific events so you need to do it with the instanceof approach. For workflows there are more fine-grained events as it is based on the Symfony workflow engine which offers these kind of events.