UknowvaView
class UknowvaView extends JView
HTML View class for the Customarticles component
Methods
Constructor
Sets a default value if not alreay assigned
Method to get data from a registered model or a property of the view
Returns an associative array of object properties.
Get the most recent error message.
Modifies a property of the object, creating it if it does not already exist.
Set the object properties based on a named array/hash.
Execute and display a template script.
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.
Allows a different extension for the layout files to be used
Adds to the stack of view script paths in LIFO order.
Adds to the stack of helper script paths in LIFO order.
Load a template file -- first look in the templates folder for an override
No description
Details
at line 12
JObject
__construct($config)
Constructor
in JObject at line 56
string
__toString()
Magic method to convert the object to a string gracefully.
in JObject at line 70
mixed
def(string $property, mixed $default = null)
Sets a default value if not alreay assigned
in JView at line 328
mixed
get(string $property, mixed $default = null)
Method to get data from a registered model or a property of the view
in JObject at line 107
array
getProperties(boolean $public = true)
Returns an associative array of object properties.
in JObject at line 133
string
getError(integer $i = null, boolean $toString = true)
Get the most recent error message.
in JObject at line 165
array
getErrors()
Return all errors, if any.
in JObject at line 180
mixed
set(string $property, mixed $value = null)
Modifies a property of the object, creating it if it does not already exist.
in JObject at line 198
boolean
setProperties(mixed $properties)
Set the object properties based on a named array/hash.
in JObject at line 222
void
setError(string $error)
Add an error message.
in JObject at line 235
string
toString()
deprecated
deprecated
at line 26
display(string $tpl = null)
Execute and display a template script.
in JView at line 223
boolean
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);
in JView at line 292
boolean
assignRef(string $key, mixed $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;
in JView at line 312
mixed
escape(mixed $var)
Escapes a value for output in a view script.
If escaping mechanism is either htmlspecialchars or htmlentities, uses {@link $_encoding} setting.
in JView at line 366
mixed
getModel(string $name = null)
Method to get the model object
in JView at line 379
string
getLayout()
Get the layout.
in JView at line 389
string
getLayoutTemplate()
Get the layout template.
in JView at line 403
string
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
in JView at line 435
object
setModel(object $model, boolean $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.
in JView at line 454
string
setLayout(string $layout)
Sets the layout name to use
in JView at line 479
string
setLayoutExt(string $value)
Allows a different extension for the layout files to be used
in JView at line 493
setEscape(mixed $spec)
Sets the _escape() callback.
in JView at line 504
void
addTemplatePath(string|array $path)
Adds to the stack of view script paths in LIFO order.
in JView at line 515
void
addHelperPath(string|array $path)
Adds to the stack of helper script paths in LIFO order.
in JView at line 527
string
loadTemplate(string $tpl = null)
Load a template file -- first look in the templates folder for an override
in JView at line 610
boolean
loadHelper(string $hlp = null)
Load a helper file