API Joomla 1.5.26
Documentation des API du CMS Joomla en version 1.5

Référence de la classe JView

Graphe d'héritage de JView:
Graphe de collaboration de JView:

Liste de tous les membres

Fonctions membres publiques

Attributs publics


Documentation des constructeurs et destructeur

JView::__construct ( config = array())

Constructor

protected

Réimplémentée dans InstallerViewDefault, et ContentView.

Références $config, et JURI::base().

Voici le graphe d'appel pour cette fonction :


Documentation des fonctions membres

JView::_addPath ( type,
path 
)

Adds to the search path for templates and resources.

protected

Paramètres:
string | array$pathThe directory or stream to search.

Références $path, et $type.

JView::_createFileName ( type,
parts = array() 
)

Create the filename for a resource

private

Paramètres:
string$typeThe resource type to create the filename for
array$partsAn associative array of filename information
Renvoie:
string The filename
Depuis:
1.5

Références $filename, $parts, et $type.

JView::_setPath ( type,
path 
)

Sets an entire array of search paths for templates or resources.

protected

Paramètres:
string$typeThe type of path to set, typically 'template'.
string | array$pathThe new set of search paths. If null or false, resets to the current directory only.

Références $mainframe, $option, $path, et $type.

JView::addHelperPath ( path)

Adds to the stack of helper script paths in LIFO order.

Paramètres:
string|arrayThe directory (-ies) to add.
Renvoie:
void

Références $path.

JView::addTemplatePath ( path)

Adds to the stack of view script paths in LIFO order.

Paramètres:
string|arrayThe directory (-ies) to add.
Renvoie:
void

Références $path.

JView::assign ( )

Assigns variables to the view script via differing strategies.

This method is overloaded; you can assign all the properties of an object, an associative array, or a single value by name.

You are not allowed to set variables that begin with an underscore; these are either private properties for JView or private variables within the template script itself.

$view = new JView();

// assign directly $view->var1 = 'something'; $view->var2 = 'else';

// assign by name and value $view->assign('var1', 'something'); $view->assign('var2', 'else');

// assign by assoc-array $ary = array('var1' => 'something', 'var2' => 'else'); $view->assign($obj);

// assign by object $obj = new stdClass; $obj->var1 = 'something'; $obj->var2 = 'else'; $view->assign($obj);

public

Renvoie:
bool True on success, false on failure.
JView::assignRef ( key,
&$  val 
)

Assign variable for the view (by reference).

You are not allowed to set variables that begin with an underscore; these are either private properties for JView or private variables within the template script itself.

$view = new JView();

// assign by name and value $view->assignRef('var1', $ref);

// assign directly $view->ref =& $var1;

public

Paramètres:
string$keyThe name for the reference in the view.
mixed&$valThe referenced variable.
Renvoie:
bool True on success, false on failure.
JView::escape ( var)

Escapes a value for output in a view script.

If escaping mechanism is one of htmlspecialchars or htmlentities, uses $_encoding setting.

Paramètres:
mixed$varThe output to escape.
Renvoie:
mixed The escaped value.
& JView::get ( property,
default = null 
)

Method to get data from a registered model or a property of the view

public

Paramètres:
stringThe name of the method to call on the model, or the property to get
stringThe name of the model to reference, or the default value [optional]
Renvoie:
mixed The return value of the method

Réimplémentée à partir de JObject.

JView::getLayout ( )

Get the layout.

public

Renvoie:
string The layout name
& JView::getModel ( name = null)

Method to get the model object

public

Paramètres:
string$nameThe name of the model (optional)
Renvoie:
mixed JModel object

Références $name.

JView::getName ( )

Method to get the view name

The model name by default parsed using the classname, or it can be set by passing a $config['name'] in the class constructor

public

Renvoie:
string The name of the model
Depuis:
1.5

Références $name, JError::raiseError(), et JError::raiseWarning().

Voici le graphe d'appel pour cette fonction :

JView::loadHelper ( hlp = null)

Load a helper file

public

Paramètres:
string$tplThe name of the helper source file ... automatically searches the helper paths and compiles as needed.
Renvoie:
boolean Returns true if the file was loaded

Références $file, JPath::find(), et jimport().

Voici le graphe d'appel pour cette fonction :

JView::loadTemplate ( tpl = null)

Load a template file -- first look in the templates folder for an override

public

Paramètres:
string$tplThe name of the template source file ... automatically searches the template paths and compiles as needed.
Renvoie:
string The output of the the template script.

Références $file, $mainframe, $option, JPath::find(), jimport(), et JError::raiseError().

Voici le graphe d'appel pour cette fonction :

JView::setEscape ( spec)

Sets the _escape() callback.

Paramètres:
mixed$specThe callback for _escape() to use.
JView::setLayout ( layout)

Sets the layout name to use

public

Paramètres:
string$templateThe template name.
Renvoie:
string Previous value
Depuis:
1.5

Références $layout.

JView::setLayoutExt ( value)

Allows a different extension for the layout files to be used

public

Paramètres:
stringThe extension
Renvoie:
string Previous value
Depuis:
1.5
& JView::setModel ( &$  model,
default = false 
)

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.

public

Paramètres:
object$modelThe model to add to the view.
boolean$defaultIs this the default model?
Renvoie:
object The added model

Références $name.


Documentation des données membres

JView::$_basePath = null
JView::$_charset = 'UTF-8'
JView::$_defaultModel = null
JView::$_escape = 'htmlspecialchars'
JView::$_layout = 'default'
JView::$_layoutExt = 'php'
JView::$_models = array()
JView::$_name = null

Réimplémentée dans MenusViewItem, et MenusViewList.

JView::$_output = null
JView::$_path
Valeur initiale :
 array(
                'template' => array(),
                'helper' => array()
        )
JView::$_template = null

Réimplémentée dans JInstallationView.


La documentation de cette classe a été générée à partir du fichier suivant :