references:joomla.framework:application:jcontroller-getmodelgetModel
Method to get a model object, loading it if required. This method will use the specified name and prefix to construct a model name and attempt to instantiate an object. The class name used for the model is determined by the specified name appended to the specified prefix (whitespace is removed). If the model class has not been defined, the model paths will be searched and the file (if found) will be loaded. The model should be stored in a file with the same name as the model. SyntaxJModel &getModel ( $name, $prefix )
ExamplesThis method is invoked in the following way: Example $model = $this->getModel('weblink'); This will load the model class named ‘WeblinksModelWeblink’. This model was found in the file ‘weblink.php’. |


