Questions tagged [model]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
2
votes
1answer
722 views

Correct / Best way of calling model methods inside view.html.php

Which is the correct/best method of calling model methods inside view.html.php. Method 1 $mydata = $this->get('MyData') ; Method 2 $model = $this->getModel() ; $mydata = $model->getMyData(...
3
votes
1answer
2k views

How to get the form of component from module?

I tried to get a component form from my module. I got the model and then tried to get the form, but the result was empty. I tried to define 'JPATH_COMPONENT' and it was useless. define('...
8
votes
1answer
4k views

How can I use a model of other component in my component?

I'm building a component and It needs access the #__content table. The component com_content does everything that my component needs to do in that table. How can I import the com_content models into ...
4
votes
1answer
647 views

Override com_users model function save

Is it possible to override the com_users save function? This is what I tried so far... <?php echo JPATH_SITE.'/components/com_users/models/profile.php'; require_once JPATH_SITE.'/components/...
2
votes
1answer
266 views

Component in module. addModelPath doesn't seem to work

I am trying to display a component in a module which seems to work using this example http://www.escope.cz/en/blog/94-how-to-load-component-in-a-module I am now facing a problem where my model isn't ...
2
votes
1answer
455 views

From the model, how I can access the data retrieved in the view?

I'm trying to add some external information to a component, and it retrieves the data in view.html.php. Once it is retrieved, how can I use it the model? I've tried as many of the usual variables ...