API16

JControllerForm/getModel

From Joomla! Documentation

< API16:JControllerForm

The "API16" namespace is an archived namespace. This page contains information for a Joomla! version which is no longer supported. It exists only as a historical reference, it will not be improved and its content may be incomplete and/or contain broken links.

Description[edit]

Method to get a model object, loading it if required.


<! removed transcluded page call, red link never existed >

Syntax[edit]

getModel($name= '', $prefix= '', $config=array('ignore_request'=> true))
Parameter Name Default Value Description
$name The model name. Optional.
$prefix The class prefix. Optional.
$config array('ignore_request'=> true) Configuration array for model. Optional.

Returns[edit]

object The model.

Defined in[edit]

libraries/joomla/application/component/controllerform.php

Importing[edit]

jimport( 'joomla.application.component.controllerform' );

Source Body[edit]

public function getModel($name = '', $prefix = '', $config = array('ignore_request' => true))
{
        if (empty($name)) {
                $name = $this->_context;
        }

        return parent::getModel($name, $prefix, $config);
}


<! removed transcluded page call, red link never existed >

Examples[edit]

Code Examples[edit]