• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

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

Marcus

Well-known member
#1
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?