API17:JView
From Joomla! Documentation
(Difference between revisions)
(Bulk upload by Doxiki2) |
(Layout updates) |
||
| Line 6: | Line 6: | ||
===Defined in=== | ===Defined in=== | ||
libraries/joomla/application/component/view.php | libraries/joomla/application/component/view.php | ||
| + | * see source code in [[jplatform:application/component/view.php|BitBucket]] | ||
===Subpackage=== | ===Subpackage=== | ||
[[Subpackage Application/11.1|Application]] | [[Subpackage Application/11.1|Application]] | ||
| Line 84: | Line 85: | ||
<source lang="php">jimport( 'joomla.application.component.view' );</source> | <source lang="php">jimport( 'joomla.application.component.view' );</source> | ||
===See also=== | ===See also=== | ||
| + | * JView source code in [[jplatform:application/component/view.php|BitBucket]] | ||
* [[JView|Other versions of this class]] | * [[JView|Other versions of this class]] | ||
{{SeeAlso:JView}} | {{SeeAlso:JView}} | ||
Revision as of 18:04, 23 April 2011
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.
[Edit Descripton] JView is an abstract class which provides the basic functionality for Joomla's MVC design pattern. You need to write your own concrete View classes, to make full use of the functionality. Learn more
The Joomla MVC Design Pattern
Model-View-Controller (MVC) is a set of design patterns, that are used to separate the different layers of your application.
- The View displays the data of the model by passing it to a template. The view object can therefore access the data of the model. Joomla implements the basic functionality in the abstract JView class.
- The Model stores the data of the application, and contains the business logic. Joomla implements the basic functionality in the abstract JModel class.
- The Controller handles the user requests and evokes the model and the views to change it's state. Joomla implements the basic functionality in the JController class.
Defined in
libraries/joomla/application/component/view.php
- see source code in BitBucket
Subpackage
Extends
Extended by
Methods
| Method name | Description |
|---|---|
| __construct | Constructor. |
| _addPath | Adds to the search path for templates and resources. |
| _createFileName | Create the filename for a resource. |
| _setPath | Sets an entire array of search paths for templates or resources. |
| addHelperPath | Adds to the stack of helper script paths in LIFO order. |
| addTemplatePath | Adds to the stack of view script paths in LIFO order. |
| assign | Assigns variables to the view script via differing strategies. |
| assignRef | Assign variable for the view (by reference). |
| display | Execute and display a template script. |
| 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. |
| getLayout | Get the layout. |
| getLayoutTemplate | Get the layout template. |
| getModel | Method to get the model object. |
| getName | Method to get the view name. |
| loadHelper | Load a helper file. |
| loadTemplate | Load a template file -- first look in the templates folder for an override. |
| setEscape | Sets the _escape() callback. |
| setLayout | Sets the layout name to use. |
| setLayoutExt | Allows a different extension for the layout files to be used. |
| setModel | Method to add a model to the view. |
Importing
jimport( 'joomla.application.component.view' );
See also
- JView source code in BitBucket
- Other versions of this class
Examples
<CodeExamplesForm />
