API15

API15:JView/getModel

From Joomla! Documentation

Revision as of 21:53, 22 March 2010 by Doxiki (talk | contribs) (New page: ===Description=== Method to get the model object <span class="editsection" style="font-size:76%;"> <nowiki>[</nowiki>Edit Descripton<nowiki>]</nowiki> ...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Description

Method to get the model object

[Edit Descripton]

Template:Description:JView/getModel

Syntax

getModel($name=null)
Parameter Name Default Value Description
$name null $name The name of the model (optional)

Returns

mixed object

Defined in

libraries/joomla/application/component/view.php

Importing

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

Source Body

function getModel($name = null)
{
        if ($name === null) {
                $name = $this->_defaultModel;
        }
        return $this->_models[strtolower($name)];
}

[Edit See Also] Template:SeeAlso:JView/getModel

Examples

<CodeExamplesForm />