Actions

API16

JControllerForm/getModel

From Joomla! Documentation

< API16:JControllerForm
Revision as of 17:35, 22 March 2010 by Doxiki (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Replacement filing cabinet.png
This Namespace has been archived - Please Do Not Edit or Create Pages in this namespace. Pages contain information for a Joomla! version which is no longer supported. It exists only as a historical reference, will not be improved and its content may be incomplete.

Contents

Description

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

[Edit Descripton]

Description:JControllerForm/getModel

Syntax

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

object The model.

Defined in

libraries/joomla/application/component/controllerform.php

Importing

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

Source Body

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

[Edit See Also] SeeAlso:JControllerForm/getModel

Examples

<CodeExamplesForm />