Where to put a Function which both Callback and Controller use: Helper?

Marcus

Well-known member
I have a function that both my Controller and my Callback need. Currently I copied it (and modified it a bit) to both areas. But that is not very convenient.

The Callback can not use Addon_Controller_Actionfunction::myFunction, asI get the error this function is not static. And if it is static, it can not make use of getModelFromCache.

Should I create a Addon_Helper_Action::myFunction and then use $getHelper('Addon_Helper_Action')->myFunction in both Controller and Callback?
 
Back
Top Bottom