J2.5 talk:Developing a MVC Component/Adding a model to the site part
From Joomla! Documentation
(Difference between revisions)
(New page: this is confusing because it looks like your method should be getMsg not get('msg')) |
m (moved Talk:Developing a Model-View-Controller (MVC) Component for Joomla!2.5 - Part 04 to Talk:Developing a Model-View-Controller Component/2.5/Adding a model to the site part: Improve structure with subpages and version disambiguation.) |
||
| (4 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
this is confusing because it looks like your method should be getMsg not get('msg') | this is confusing because it looks like your method should be getMsg not get('msg') | ||
| + | |||
| + | |||
| + | ---- | ||
| + | I agree, that's why I prefer to use (on the view): | ||
| + | |||
| + | |||
| + | $model = &$this->getModel(); | ||
| + | |||
| + | $this->msg = $model->getMsg(); | ||
| + | |||
| + | |||
| + | It's less confusing and it works fine also | ||
| + | --[[User:Apaulo|Apaulo]] 14:30, 2 June 2011 (CDT) | ||
Revision as of 14:30, 6 August 2012
this is confusing because it looks like your method should be getMsg not get('msg')
I agree, that's why I prefer to use (on the view):
$model = &$this->getModel();
$this->msg = $model->getMsg();
It's less confusing and it works fine also
--Apaulo 14:30, 2 June 2011 (CDT)