- Issue created by @renzocarletti
- 🇩🇪Germany jurgenhaas Gottmadingen
Thanks @RenzoCarletti for posting your support request. It's difficult to work on this, as my Spanish is simply non-existant ;-) So, when you upload a model for review, it would be much better to keep names and comments in such a model in English - otherwise helping is not really possible.
Not sure, what you want to achieve with your event subscriber. ECA is not designed to dispatch events from any custom code. If ECA functionality is not sufficient and you need something extra, you may want to write an action plugin. Such action plugins can then be called from within an ECA model.
- 🇦🇷Argentina renzocarletti
thanks for the fast answer Jurgen, well, changing the model to english and my request, i created an action, how can i send the "order" entity there? i need to work with the entity order from the commerce part (attached in a .txt what I have achieved) but im just getting the field like string, if the question is not easy to understand ill try to explain better, but in short, i need to send from eca the entity loaded on a field, to a custom module, using an Action, sorry if im not being good explaining ill try different redact if is not understandable, and if the request is not supposed to be made here, I will make it in another forum, thanks anyway
- 🇩🇪Germany jurgenhaas Gottmadingen
You can make your action entity aware by defining an entity context in the annotation. And in addition, you can make your action configurable so that you get config fields in ECA to define potentially other values as well that the action will then receive in its configuration and continue working with them.
The best way to find out about the details is to review existing action, e.g. in the eca_content sub-module, which works a lot with entities that are forwarded to the actions.
However, as ECA is able to work with entities, fields, tokens, states and so much more, it is very likely that you can achieve what you want without the need for custom code. Only if there is something missing, then you need your own plugins.
I can't justify which way you needed to go. The description of the use case is very complex and hard to understand without the background. Instead of writing long paragraphs, it may be easier to structure the description in small items, just like you would probably do when writing a PHP program. And guess what, my own experience has been, when writing it down in such a structured way, it turns into a blue print on how I could do it in ECA.
Maybe you want to give that approach a try. Should you get lost in the process, of course let us know and we try what we can to help.
- Status changed to Postponed: needs info
over 1 year ago 1:45pm 10 May 2023 - Status changed to Fixed
over 1 year ago 7:33am 13 July 2023 Automatically closed - issue fixed for 2 weeks with no activity.