I have a situation where I am building a module for Magento2 with 3 Models that kind of interact with each other depending on the situation.

I tried to inject the classes withing them selves but that doesn't seem correct, so I ended up putting all my business logic into the Helper class. I know I shouldn't do that (right?), so what else can I do in a situation like that?

My module is an endpoint API that receives a request, process it and return a response, so everything is done under the hood, with one view, one block and one controller.

Thank you

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.