class CustomarticlesViewCustomarticles extends JView


Located at : UKNOWVA_ROOT/components/com_customarticles/views/customarticles/view.html.php

HTML View class for the Customarticles component

Methods

__construct($config = array())

Constructor

from JView
string
__toString()

Magic method to convert the object to a string gracefully.

from JObject
mixed
def(string $property, mixed $default = null)

Sets a default value if not alreay assigned

from JObject
mixed
get(string $property, mixed $default = null)

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

from JView
array
getProperties(boolean $public = true)

Returns an associative array of object properties.

from JObject
string
getError(integer $i = null, boolean $toString = true)

Get the most recent error message.

from JObject
array
getErrors()

Return all errors, if any.

from JObject
mixed
set(string $property, mixed $value = null)

Modifies a property of the object, creating it if it does not already exist.

from JObject
boolean
setProperties(mixed $properties)

Set the object properties based on a named array/hash.

from JObject
void
setError(string $error)

Add an error message.

from JObject
string
toString() deprecated

No description

from JObject
display(string $tpl = null)

Execute and display a template script.

boolean
assign()

Assigns variables to the view script via differing strategies.

from JView
boolean
assignRef(string $key, mixed $val)

Assign variable for the view (by reference).

from JView
mixed
escape(mixed $var)

Escapes a value for output in a view script.

from JView
mixed
getModel(string $name = null)

Method to get the model object

from JView
string
getLayout()

Get the layout.

from JView
string
getLayoutTemplate()

Get the layout template.

from JView
string
getName()

Method to get the view name

from JView
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.

from JView
string
setLayout(string $layout)

Sets the layout name to use

from JView
string
setLayoutExt(string $value)

Allows a different extension for the layout files to be used

from JView
setEscape(mixed $spec)

Sets the _escape() callback.

from JView
void
addTemplatePath(string|array $path)

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

from JView
void
addHelperPath(string|array $path)

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

from JView
string
loadTemplate(string $tpl = null)

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

from JView
boolean
loadHelper(string $hlp = null)

Load a helper file

from JView
checkForPermissions($artId)

No description

Details

in JView at line 114
JObject __construct($config = array())

Constructor

Parameters

$config

Return Value

JObject

in JObject at line 56
string __toString()

Magic method to convert the object to a string gracefully.

Return Value

string The classname.

in JObject at line 70
mixed def(string $property, mixed $default = null)

Sets a default value if not alreay assigned

Parameters

string $property The name of the property.
mixed $default The default value.

Return Value

mixed

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

Parameters

string $property The name of the property.
mixed $default The default value.

Return Value

mixed The value of the property.

in JObject at line 107
array getProperties(boolean $public = true)

Returns an associative array of object properties.

Parameters

boolean $public If true, returns only the public properties.

Return Value

array

See also

get()

in JObject at line 133
string getError(integer $i = null, boolean $toString = true)

Get the most recent error message.

Parameters

integer $i Option error index.
boolean $toString Indicates if JError objects should return their error message.

Return Value

string Error message

in JObject at line 165
array getErrors()

Return all errors, if any.

Return Value

array Array of error messages or JErrors.

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.

Parameters

string $property The name of the property.
mixed $value The value of the property to set.

Return Value

mixed Previous value of the property.

in JObject at line 198
boolean setProperties(mixed $properties)

Set the object properties based on a named array/hash.

Parameters

mixed $properties Either an associative array or another object.

Return Value

boolean

See also

set()

in JObject at line 222
void setError(string $error)

Add an error message.

Parameters

string $error Error message.

Return Value

void

in JObject at line 235
string toString() deprecated

deprecated 12.1 Use magic method __toString()

Return Value

string

See also

__toString()

at line 24
display(string $tpl = null)

Execute and display a template script.

Parameters

string $tpl The name of the template file to parse; automatically searches through the template paths.

Exceptions

object An JError object.

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);

Return Value

boolean True on success, false on failure.

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;

Parameters

string $key The name for the reference in the view.
mixed $val &$val The referenced variable.

Return Value

boolean True on success, false on failure.

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.

Parameters

mixed $var The output to escape.

Return Value

mixed The escaped value.

in JView at line 366
mixed getModel(string $name = null)

Method to get the model object

Parameters

string $name The name of the model (optional)

Return Value

mixed JModel object

in JView at line 379
string getLayout()

Get the layout.

Return Value

string The layout name

in JView at line 389
string getLayoutTemplate()

Get the layout template.

Return Value

string The layout template name

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

Return Value

string The name of the model

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.

Parameters

object $model The model to add to the view.
boolean $default Is this the default model?

Return Value

object The added model

in JView at line 454
string setLayout(string $layout)

Sets the layout name to use

Parameters

string $layout The layout name or a string in format