hi all, after a few years hiatus I'm getting back to developing for joomla. I'm trying to learn how to develop components. on the getmodel() method there's an argument array('ignore_request' => true) I don't understand that part 'ignore_request => true' if anyone can explain that to me, I'll appreciate it. thanks.
souleye--
You received this message because you are subscribed to the Google Groups "Joomla! General Development" group.
To view this discussion on the web, visit https://groups.google.com/d/msg/joomla-dev-general/-/5Q1f5v1KpkUJ.
To post to this group, send an email to joomla-de...@googlegroups.com.
To unsubscribe from this group, send email to joomla-dev-gene...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/joomla-dev-general?hl=en-GB.
Joomla Models have a method called populateState() that is automatically called if that flag is not set.
The following automatically call the models populateState() method which usually includes some state setters based on the request.
$model = JModel::getInstance('MyModel', 'XYZModel');
$item = $model->getItem();
The following allows you to ignore the request and set your own state setters
$model = JModel::getInstance('MyModel', 'XYZModel', array('ignore_request'=>true));
$model->setState('filter.id', 123);
$item = $model->getItem();
Regards,
Phill Brown
M 04 2481 9754
Bathurst Software Solutions
-------------------------------------------------------------------------------------------------------------------
On Wed, Jun 13, 2012 at 1:02 AM, souleye <sou...@gmail.com> wrote:
hi all, after a few years hiatus I'm getting back to developing for joomla. I'm trying to learn how to develop components. on the getmodel() method there's an argument array('ignore_request' => true) I don't understand that part 'ignore_request => true' if anyone can explain that to me, I'll appreciate it. thanks.
souleye--
You received this message because you are subscribed to the Google Groups "Joomla! General Development" group.
To view this discussion on the web, visit https://groups.google.com/d/msg/joomla-dev-general/-/5Q1f5v1KpkUJ.
To post to this group, send an email to joomla-dev-general@googlegroups.com.
To unsubscribe from this group, send email to joomla-dev-general+unsub...@googlegroups.com.