Questions tagged [model]

For questions regarding Models used in software to manage the data, logic and rules of the application.

Filter by
Sorted by
Tagged with
0 votes
3 answers

Store data to other table and get the id

I'm using a method to store information in another table. This is how I'm doing that: public static function CreateMail($userid, $title, $state = 1) { $maildata['userid'] = $userid; ...
MyFault's user avatar
  • 677
2 votes
1 answer

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(...
Malaiselvan's user avatar
  • 2,731
10 votes
2 answers

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 ...
csbenjamin's user avatar
7 votes
2 answers

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 ...
sifu's user avatar
  • 1,105
5 votes
1 answer

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/...
miguelmpn's user avatar
  • 303
3 votes
1 answer

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('...
aspirisen's user avatar
  • 183
2 votes
1 answer

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 ...
Al Knight's user avatar
  • 411
2 votes
1 answer

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 I am now facing a problem where my model isn't ...
AdRock's user avatar
  • 133