class JFormHelper


Located at : UKNOWVA_ROOT/libraries/joomla/form/helper.php

JForm's helper class.

Provides a storage for filesystem's paths where JForm's entities reside and methods for creating those entities. Also stores objects with entities' prototypes for further reusing.

Methods

static mixed
loadFieldType(string $type, boolean $new = true)

Method to load a form field object given a type.

static mixed
loadRuleType(string $type, boolean $new = true)

Method to load a form rule object given a type.

static mixed
loadFieldClass(string $type)

Attempt to import the JFormField class file if it isn't already imported.

static mixed
loadRuleClass(string $type)

Attempt to import the JFormRule class file if it isn't already imported.

static array
addFieldPath(mixed $new = null)

Method to add a path to the list of field include paths.

static array
addFormPath(mixed $new = null)

Method to add a path to the list of form include paths.

static array
addRulePath(mixed $new = null)

Method to add a path to the list of rule include paths.

Details

at line 68
static mixed loadFieldType(string $type, boolean $new = true)

Method to load a form field object given a type.

Parameters

string $type The field type.
boolean $new Flag to toggle whether we should get a new instance of the object.

Return Value

mixed JFormField object on success, false otherwise.

at line 82
static mixed loadRuleType(string $type, boolean $new = true)

Method to load a form rule object given a type.

Parameters

string $type The rule type.
boolean $new Flag to toggle whether we should get a new instance of the object.

Return Value

mixed JFormRule object on success, false otherwise.

at line 133
static mixed loadFieldClass(string $type)

Attempt to import the JFormField class file if it isn't already imported.

You can use this method outside of JForm for loading a field for inheritance or composition.

Parameters

string $type Type of a field whose class should be loaded.

Return Value

mixed Class name on success or false otherwise.

at line 148
static mixed loadRuleClass(string $type)

Attempt to import the JFormRule class file if it isn't already imported.

You can use this method outside of JForm for loading a rule for inheritance or composition.

Parameters

string $type Type of a rule whose class should be loaded.

Return Value

mixed Class name on success or false otherwise.

at line 208
static array addFieldPath(mixed $new = null)

Method to add a path to the list of field include paths.

Parameters

mixed $new A path or array of paths to add.

Return Value

array The list of paths that have been added.

at line 222
static array addFormPath(mixed $new = null)

Method to add a path to the list of form include paths.

Parameters

mixed $new A path or array of paths to add.

Return Value

array The list of paths that have been added.

at line 236
static array addRulePath(mixed $new = null)

Method to add a path to the list of rule include paths.

Parameters

mixed $new A path or array of paths to add.

Return Value

array The list of paths that have been added.