API16

JView

From Joomla! Documentation

Revision as of 04:59, 30 March 2010 by Doxiki (talk | contribs)

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.

[Edit Descripton] Template:Description:JView

Defined in[edit]

libraries/joomla/application/component/view.php

Methods[edit]

Method name Description
__construct Constructor
display Execute and display a template script.
assign Assigns variables to the view script via differing strategies.
assignRef Assign variable for the view (by reference).
escape Escapes a value for output in a view script.
get Method to get data from a registered model or a property of the view
getModel Method to get the model object
getLayout Get the layout.
getName Method to get the view name
setModel Method to add a model to the view. We support a multiple model single view system by which models are referenced by classname. A caveat to the classname referencing is that any classname prepended by JModel will be referenced by the name without JModel, eg. JModelCategory is just Category.
setLayout Sets the layout name to use
setLayoutExt Allows a different extension for the layout files to be used
setEscape Sets the _escape() callback.
addTemplatePath Adds to the stack of view script paths in LIFO order.
addHelperPath Adds to the stack of helper script paths in LIFO order.
loadTemplate Load a template file -- first look in the templates folder for an override
loadHelper Load a helper file

Importing[edit]

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

[Edit See Also] Template:SeeAlso:JView

Examples[edit]

<CodeExamplesForm />