Skip to main content

Questions tagged [model]

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

1 vote
1 answer
83 views

What drives me crazy with Joomla! and I still don't understand: If I create a model for a component or module and this consists of several words (for example File Item) then I call the model in ...
Marco's user avatar
  • 705
0 votes
2 answers
222 views

This question has been asked before, more than once. However, things have changed a lot and the previous answers are all outdated. In Joomla 3.x, we used to do: BaseDatabaseModel::addIncludePath(...
mavrosxristoforos's user avatar
0 votes
1 answer
50 views

I am developing a backend plugin and I need to count the elements returned by a search, but I don't know how to specify multiple values for one field using the setState method. This is the code: $...
luX0r's user avatar
  • 341
0 votes
1 answer
127 views

When calling an AJAX Method in a Module Helper file the method has to be static. I have no app context there, when doing the following: public static function getDataAjax() { $data = ...
Marco's user avatar
  • 705
1 vote
2 answers
99 views

Is there any difference in these two inside a frontend controller? Performance or memory wise? In the end both are doing createModel, right? Thanks! $model = $this->getModel('Object', 'Site'); vs $...
maidan's user avatar
  • 463
0 votes
1 answer
133 views

I have a method in a model and I need the array of state variables. In controller it's easy, simply get an $model object and get the array with $state = $model->getState(); But in a model all my ...
Peli's user avatar
  • 103
0 votes
1 answer
83 views

I've added Router Features today to my Custom Component - all works finde beside the fact that the $pk variable inside the model holds a curios value (202n) where 'n' is different for each element... ...
Marco's user avatar
  • 705
0 votes
1 answer
121 views

What is exactly the difference between: $model = \JModelLegacy::getInstance('Objects', 'MyModel'); and $model = BaseDatabaseModel::getInstance('Objects', 'MyModel'); Is there some performance ...
maidan's user avatar
  • 463
1 vote
1 answer
112 views

I'm trying to find a way to customize the message displayed after a successful record has been saved in a custom component. Well not really the entire message, just the 'item' part. For instance if my ...
chavab_1's user avatar
  • 195
1 vote
0 answers
83 views

When trying to get all items from my list model inside a plugin, I use this: $objects = $app->bootComponent('com_foo')->getMVCFactory()->createModel('Objects', 'MyModel', ['ignore_request' =&...
maidan's user avatar
  • 463
0 votes
1 answer
638 views

I need to use two models in a view for my custom component in Joomla 4. I saw this post for Joomla 3, but it seems that there isn't getInstance() in the base Models anymore. How I could do it ?
framontb's user avatar
  • 257
1 vote
1 answer
242 views

public function getLaymanLayout($id){ $form = $this->getForm(); $form->bind(0); } I still have a lot to implement and make it correct to the MVC rules. I want to call a table from the ...
DeesreX's user avatar
  • 87
2 votes
0 answers
98 views

What is the reason a Joomla integrated component like contacts sets modified and modified_by while saving once in the prepareTable() method of the Model and also in the storeTable() method? Is this ...
maidan's user avatar
  • 463
1 vote
0 answers
63 views

I have a site which displays a directory of registered users on the frontend. I've allowed users to select topics of interests when they're registering. In the directory they then can search by names ...
chavab_1's user avatar
  • 195
2 votes
1 answer
353 views

I have a question, and I am a bit confused where i need to put this. I have a controller which is mainly empty: class ControllerProfiles extends Controller { public function &getModel($...
Kuubs's user avatar
  • 347

15 30 50 per page
1
2 3 4 5 6