Actions

API16

JControllerForm/getModel

From Joomla! Documentation

< API16:JControllerForm
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.

[<! removed edit link to red link >]

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

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);
}

[<! removed edit link to red link >] <! removed transcluded page call, red link never existed >

Examples

<CodeExamplesForm />