How to call a function of other model? - Joomla! Forum - community, help and support
hi bro!
i'm new guy! i'm trying deverlop new component mutilmodel, how can call function of other model in component?
thanks answer question!
i'm new guy! i'm trying deverlop new component mutilmodel, how can call function of other model in component?
thanks answer question!
alphavn wrote:hi bro!
i'm new guy! i'm trying deverlop new component mutilmodel, how can call function of other model in component?
thanks answer question!
use jview::get() method.
code: select all
/* code located in view
i call function defined in model named getmy_function().
the jview:: get() looks "get" prefix on functions in model.
the second argument registered model name in method.
*/
$data = &get('my_function', 'my_model');
Comments
Post a Comment