references:joomla.framework:application:jview-getget
Retrieves data from a registered model. This method can be used from the view to invoke data retrieval methods on the model. The method will invoke the specified ‘get’ method on the specified model. A call to get( ‘example’ ) will invoke the method getExample on the model. If no model is specified, the default model will be used. If the method does not exist on the specified model, then a warning will be raised. If the specified model does not exist then the JObject::get() method will be invoked with the specified parameters. The method returns the result of the model method call or false if the method failed. Syntaxmixed &get ( $method, $model )
ExamplesIf you had a model object with the following method: JModel::getExample() method function getExample() { return 'example'; } you might call it in your view using: Example $example = $this->get('example'); DISCUSSION~~ |


