I just wanna to trigger the custom event inside the db model xxxTable 's save() method, that means I thought I don’t need to pass the eventmanager from action to save() method.
I wanna to trigger the event right directly in db table’s save() method without any eventmanager param into this method.
I am trying to decouple, just new it inside the save() method, that’s what I did above. But it seems I am on the wrong direction.
In a Controller action, it is very easy to access the eventmanager via $this->getEventManager(),
However If I wanna to use in a xxxTable’s save method, should I have to pass the eventmanager into save method via a param?