Hi
I am writing a fairly sizable extension, having built the backend logic/display etc but I have come up against a hurdle with the prepareForWidget() method when building the frontend. I have some form fields I would like to render, some of which are of the 'select' type, for which, I need to have an options list generated. I am ok with implimenting either ['field']['options'] or ['field']['options_callbacks'] as necessary (as I've done so in the backend). Options is no good as the data is in the database so I figured using 'options_callback' was the way to go, but in this case, I have a variable that is available in my frontend module (class MyModule extends Module) which is required to get the correct data from the database when using the options_callback. I should say that a number of the methods provided by my module are provided from other classes I have written, extending Model, Controller, Frontend. The only class that the variable is available is is the 'class MyModule extends Module' class - I have to confess to being a bit n00bish when it comes to OOP, learning as I go and this issue undoubtedly stepms from my limited OOP knowledge.
Any help would be gratefully accepted though as to how I get my variable into another class :-)
Bookmarks