Questions tagged [model]
The model tag has no usage guidance.
7
questions
2
votes
1answer
919 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(...
7
votes
2answers
3k views
How to call a model method from a system plugin?
I have a component ('com_foo') which has a model called 'foobar'. The class declaration is like this:
class FooModelbar extends JModelItem
This class has a public method called getFooBar().
I also ...
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
2answers
5k 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 ...
5
votes
1answer
888 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/...
3
votes
1answer
467 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 ...
3
votes
1answer
348 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 ...