JController::getModel: Difference between revisions
From Joomla! Documentation
m clean up |
m preparing for archive only |
||
| Line 4: | Line 4: | ||
Method to get a model object, loading it if required. | Method to get a model object, loading it if required. | ||
<source lang="php"> | <source lang="php"> | ||
| Line 44: | Line 44: | ||
* {{JVer|11.1}} Subpackage [[API17:Subpackage_Application|Application]] | * {{JVer|11.1}} Subpackage [[API17:Subpackage_Application|Application]] | ||
* [[API17:JController::getModel|Other versions of JController::getModel]] | * [[API17:JController::getModel|Other versions of JController::getModel]] | ||
===User contributed notes=== | ===User contributed notes=== | ||
=== Code Examples === | |||
<dpl> | <dpl> | ||
noresultsheader=\n | noresultsheader=\n | ||
category=JController::getModel | category=JController::getModel | ||
namespace=CodeExample | |||
category=MethodExample | category=MethodExample | ||
include=* | include=* | ||
Latest revision as of 02:31, 25 March 2017
JController::getModel
Description
Method to get a model object, loading it if required.
public function getModel (
$name= ''
$prefix= ''
$config=array
)
| Parameter | Type | Default | Description |
|---|---|---|---|
| $name | string | The model name. Optional. | |
| $prefix | string | The class prefix. Optional. | |
| $config | array | array() | Configuration array for model. Optional. |
- Returns object The model.
- Defined on line 681 of libraries/joomla/application/component/controller.php
- Since

See also
JController::getModel source code on BitBucket
Class JController
Subpackage Application- Other versions of JController::getModel
User contributed notes
Code Examples