API17

Difference between revisions of "JView"

From Joomla! Documentation

(Layout updates)
m (→‎User contributed notes: bad link repair)
(One intermediate revision by one other user not shown)
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
 +
=={{JVer|11.1}} JView==
 +
===Description===
 +
{{Description:JView}}
 
<span class="editsection" style="font-size:76%;">
 
<span class="editsection" style="font-size:76%;">
 
<nowiki>[</nowiki>[[Description:JView|Edit Descripton]]<nowiki>]</nowiki>
 
<nowiki>[</nowiki>[[Description:JView|Edit Descripton]]<nowiki>]</nowiki>
 
</span>
 
</span>
{{Description:JView}}
 
===Defined in===
 
libraries/joomla/application/component/view.php
 
* see source code in [[jplatform:application/component/view.php|BitBucket]]
 
===Subpackage===
 
[[Subpackage Application/11.1|Application]]
 
===Extends===
 
[[JObject/11.1|JObject]]
 
===Extended by===
 
 
===Methods===
 
===Methods===
 
{| class="wikitable sortable"
 
{| class="wikitable sortable"
 
|-
 
|-
 +
!Visibility
 
!Method name
 
!Method name
 
!Description
 
!Description
 
|-
 
|-
|[[JView::__construct/11.1|__construct]]
+
|public
|Constructor.
 
|-
 
|[[JView::_addPath/11.1|_addPath]]
 
|Adds to the search path for templates and resources.
 
|-
 
|[[JView::_createFileName/11.1|_createFileName]]
 
|Create the filename for a resource.
 
|-
 
|[[JView::_setPath/11.1|_setPath]]
 
|Sets an entire array of search paths for templates or resources.
 
|-
 
 
|[[JView::addHelperPath/11.1|addHelperPath]]
 
|[[JView::addHelperPath/11.1|addHelperPath]]
 
|Adds to the stack of helper script paths in LIFO order.  
 
|Adds to the stack of helper script paths in LIFO order.  
 
|-
 
|-
 +
|public
 
|[[JView::addTemplatePath/11.1|addTemplatePath]]
 
|[[JView::addTemplatePath/11.1|addTemplatePath]]
 
|Adds to the stack of view script paths in LIFO order.  
 
|Adds to the stack of view script paths in LIFO order.  
 
|-
 
|-
 +
|public
 
|[[JView::assign/11.1|assign]]
 
|[[JView::assign/11.1|assign]]
 
|Assigns variables to the view script via differing strategies.  
 
|Assigns variables to the view script via differing strategies.  
 
|-
 
|-
 +
|public
 
|[[JView::assignRef/11.1|assignRef]]
 
|[[JView::assignRef/11.1|assignRef]]
 
|Assign variable for the view (by reference).  
 
|Assign variable for the view (by reference).  
 
|-
 
|-
 +
|public
 
|[[JView::display/11.1|display]]
 
|[[JView::display/11.1|display]]
 
|Execute and display a template script.  
 
|Execute and display a template script.  
 
|-
 
|-
 +
|public
 
|[[JView::escape/11.1|escape]]
 
|[[JView::escape/11.1|escape]]
 
|Escapes a value for output in a view script.  
 
|Escapes a value for output in a view script.  
 
|-
 
|-
 +
|public
 
|[[JView::get/11.1|get]]
 
|[[JView::get/11.1|get]]
 
|Method to get data from a registered model or a property of the view.  
 
|Method to get data from a registered model or a property of the view.  
 
|-
 
|-
 +
|public
 
|[[JView::getLayout/11.1|getLayout]]
 
|[[JView::getLayout/11.1|getLayout]]
 
|Get the layout.  
 
|Get the layout.  
 
|-
 
|-
 +
|public
 
|[[JView::getLayoutTemplate/11.1|getLayoutTemplate]]
 
|[[JView::getLayoutTemplate/11.1|getLayoutTemplate]]
 
|Get the layout template.  
 
|Get the layout template.  
 
|-
 
|-
 +
|public
 
|[[JView::getModel/11.1|getModel]]
 
|[[JView::getModel/11.1|getModel]]
 
|Method to get the model object.  
 
|Method to get the model object.  
 
|-
 
|-
 +
|public
 
|[[JView::getName/11.1|getName]]
 
|[[JView::getName/11.1|getName]]
 
|Method to get the view name.  
 
|Method to get the view name.  
 
|-
 
|-
 +
|public
 
|[[JView::loadHelper/11.1|loadHelper]]
 
|[[JView::loadHelper/11.1|loadHelper]]
 
|Load a helper file.  
 
|Load a helper file.  
 
|-
 
|-
 +
|public
 
|[[JView::loadTemplate/11.1|loadTemplate]]
 
|[[JView::loadTemplate/11.1|loadTemplate]]
 
|Load a template file -- first look in the templates folder for an override.  
 
|Load a template file -- first look in the templates folder for an override.  
 
|-
 
|-
 +
|public
 
|[[JView::setEscape/11.1|setEscape]]
 
|[[JView::setEscape/11.1|setEscape]]
 
|Sets the _escape() callback.  
 
|Sets the _escape() callback.  
 
|-
 
|-
 +
|public
 
|[[JView::setLayout/11.1|setLayout]]
 
|[[JView::setLayout/11.1|setLayout]]
 
|Sets the layout name to use.  
 
|Sets the layout name to use.  
 
|-
 
|-
 +
|public
 
|[[JView::setLayoutExt/11.1|setLayoutExt]]
 
|[[JView::setLayoutExt/11.1|setLayoutExt]]
 
|Allows a different extension for the layout files to be used.  
 
|Allows a different extension for the layout files to be used.  
 
|-
 
|-
 +
|public
 
|[[JView::setModel/11.1|setModel]]
 
|[[JView::setModel/11.1|setModel]]
 
|Method to add a model to the view.  
 
|Method to add a model to the view.  
 +
|-
 +
|protected
 +
|[[JView::__construct/11.1|__construct]]
 +
|Constructor.
 +
|-
 +
|protected
 +
|[[JView::_addPath/11.1|_addPath]]
 +
|Adds to the search path for templates and resources.
 +
|-
 +
|protected
 +
|[[JView::_setPath/11.1|_setPath]]
 +
|Sets an entire array of search paths for templates or resources.
 
|-
 
|-
 
|}
 
|}
 +
* '''Defined in''' libraries/joomla/application/component/view.php
 +
* '''Extends''' [[JObject/11.1|JObject]]
 
===Importing===
 
===Importing===
 
<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]]
+
* {{JVer|11.1}} '''JView source code''' on [[jplatform:application/component/view.php|BitBucket]]
* [[JView|Other versions of this class]]
+
* {{JVer|11.1}} Subpackage [[Subpackage Application/11.1|Application]]
 +
* [[JView|Other versions of JView]]
 
{{SeeAlso:JView}}
 
{{SeeAlso:JView}}
 
<span class="editsection" style="font-size:76%;">
 
<span class="editsection" style="font-size:76%;">
 
<nowiki>[</nowiki>[[SeeAlso:JView|Edit See Also]]<nowiki>]</nowiki>
 
<nowiki>[</nowiki>[[SeeAlso:JView|Edit See Also]]<nowiki>]</nowiki>
 
</span>
 
</span>
===Examples===
+
===User contributed notes===
 
<CodeExamplesForm />
 
<CodeExamplesForm />
 
<dpl>
 
<dpl>
Line 99: Line 114:
 
category=ClassExample
 
category=ClassExample
 
include=*
 
include=*
 +
namespace=CodeExample
 
format= ,,,
 
format= ,,,
 
</dpl>
 
</dpl>
<noinclude>[[Category:Platform]][[Category:Platform 11.1]][[Category:JView]]</noinclude>
+
<noinclude>[[Category:Platform JClasses]][[Category:Platform 11.1]][[Category:JView]]</noinclude>

Revision as of 14:07, 29 August 2012

The "API17" 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.

Joomla 11.1 JView[edit]

Description[edit]

Template:Description:JView [Edit Descripton]

Methods[edit]

Visibility Method name Description
public addHelperPath Adds to the stack of helper script paths in LIFO order.
public addTemplatePath Adds to the stack of view script paths in LIFO order.
public assign Assigns variables to the view script via differing strategies.
public assignRef Assign variable for the view (by reference).
public display Execute and display a template script.
public escape Escapes a value for output in a view script.
public get Method to get data from a registered model or a property of the view.
public getLayout Get the layout.
public getLayoutTemplate Get the layout template.
public getModel Method to get the model object.
public getName Method to get the view name.
public loadHelper Load a helper file.
public loadTemplate Load a template file -- first look in the templates folder for an override.
public setEscape Sets the _escape() callback.
public setLayout Sets the layout name to use.
public setLayoutExt Allows a different extension for the layout files to be used.
public setModel Method to add a model to the view.
protected __construct Constructor.
protected _addPath Adds to the search path for templates and resources.
protected _setPath Sets an entire array of search paths for templates or resources.
  • Defined in libraries/joomla/application/component/view.php
  • Extends JObject

Importing[edit]

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

See also[edit]

Template:SeeAlso:JView [Edit See Also]

User contributed notes[edit]

<CodeExamplesForm />