Joomla CMS  3.10.11 (avec JPlatform 13.1 inclus)
Documentation des API du CMS Joomla en version 3.10.11 et du framework Joomla Platform intégré
Référence de la classe FormHelper

Fonctions membres publiques statiques

static loadFieldType ($type, $new=true)
 
static loadRuleType ($type, $new=true)
 
static loadFieldClass ($type)
 
static loadRuleClass ($type)
 
static addFieldPath ($new=null)
 
static addFormPath ($new=null)
 
static addRulePath ($new=null)
 
static addFieldPrefix ($new=null)
 
static addFormPrefix ($new=null)
 
static addRulePrefix ($new=null)
 
static parseShowOnConditions ($showOn, $formControl=null, $group=null)
 

Fonctions membres protégées statiques

static loadType ($entity, $type, $new=true)
 
static loadClass ($entity, $type)
 
static addPath ($entity, $new=null)
 
static addPrefix ($entity, $new=null)
 

Attributs protégés statiques

static $paths
 
static $prefixes = array('field' => array(), 'form' => array(), 'rule' => array())
 
static $entities = array('field' => array(), 'form' => array(), 'rule' => array())
 

Description détaillée

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

Depuis
1.7.0

Documentation des fonctions membres

◆ addFieldPath()

static addFieldPath (   $new = null)
static

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

Paramètres
mixed$newA path or array of paths to add.
Renvoie
array The list of paths that have been added.
Depuis
1.7.0

Référencé par PlgUserTerms\__construct(), FormWrapper\addFieldPath(), et Form\addFieldPath().

◆ addFieldPrefix()

static addFieldPrefix (   $new = null)
static

Method to add a namespace prefix to the list of field lookups.

Paramètres
mixed$newA namespaces or array of namespaces to add.
Renvoie
array The list of namespaces that have been added.
Depuis
3.8.0

Référencé par Form\syncPaths().

◆ addFormPath()

static addFormPath (   $new = null)
static

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

Paramètres
mixed$newA path or array of paths to add.
Renvoie
array The list of paths that have been added.
Depuis
1.7.0

Référencé par FormWrapper\addFormPath(), et Form\addFormPath().

◆ addFormPrefix()

static addFormPrefix (   $new = null)
static

Method to add a namespace to the list of form lookups.

Paramètres
mixed$newA namespace or array of namespaces to add.
Renvoie
array The list of namespaces that have been added.
Depuis
3.8.0

Référencé par Form\syncPaths().

◆ addPath()

static addPath (   $entity,
  $new = null 
)
staticprotected

Method to add a path to the list of include paths for one of the form's entities. Currently supported entities: field, rule and form. You are free to support your own in a subclass.

Paramètres
string$entityForm's entity name for which paths will be added.
mixed$newA path or array of paths to add.
Renvoie
array The list of paths that have been added.
Depuis
1.7.0

Références $path.

◆ addPrefix()

static addPrefix (   $entity,
  $new = null 
)
staticprotected

Method to add a namespace to the list of namespaces for one of the form's entities. Currently supported entities: field, rule and form. You are free to support your own in a subclass.

Paramètres
string$entityForm's entity name for which paths will be added.
mixed$newA namespace or array of namespaces to add.
Renvoie
array The list of namespaces that have been added.
Depuis
3.8.0

Références $prefix.

◆ addRulePath()

static addRulePath (   $new = null)
static

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

Paramètres
mixed$newA path or array of paths to add.
Renvoie
array The list of paths that have been added.
Depuis
1.7.0

Référencé par FormWrapper\addRulePath(), et Form\addRulePath().

◆ addRulePrefix()

static addRulePrefix (   $new = null)
static

Method to add a namespace to the list of rule lookups.

Paramètres
mixed$newA namespace or array of namespaces to add.
Renvoie
array The list of namespaces that have been added.
Depuis
3.8.0

Référencé par Form\syncPaths().

◆ loadClass()

static loadClass (   $entity,
  $type 
)
staticprotected

Load a class for one of the form's entities of a particular type. Currently, it makes sense to use this method for the "field" and "rule" entities (but you can support more entities in your subclass).

Paramètres
string$entityOne of the form entities (field or rule).
string$typeType of an entity.
Renvoie
string|boolean Class name on success or false otherwise.
Depuis
1.7.0

Références $class, $file, $i, $n, $name, $path, $prefix, $type, et Normalise\toSpaceSeparated().

◆ loadFieldClass()

static loadFieldClass (   $type)
static

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.

Paramètres
string$typeType of a field whose class should be loaded.
Renvoie
string|boolean Class name on success or false otherwise.
Depuis
1.7.0

Références $type.

Référencé par FormWrapper\loadFieldClass().

◆ loadFieldType()

static loadFieldType (   $type,
  $new = true 
)
static

Method to load a form field object given a type.

Paramètres
string$typeThe field type.
boolean$newFlag to toggle whether we should get a new instance of the object.
Renvoie
FormField|boolean FormField object on success, false otherwise.
Depuis
1.7.0

Références $type.

Référencé par FormWrapper\loadFieldType(), et Form\loadFieldType().

◆ loadRuleClass()

static loadRuleClass (   $type)
static

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.

Paramètres
string$typeType of a rule whose class should be loaded.
Renvoie
string|boolean Class name on success or false otherwise.
Depuis
1.7.0

Références $type.

Référencé par FormWrapper\loadRuleClass().

◆ loadRuleType()

static loadRuleType (   $type,
  $new = true 
)
static

Method to load a form rule object given a type.

Paramètres
string$typeThe rule type.
boolean$newFlag to toggle whether we should get a new instance of the object.
Renvoie
FormRule|boolean FormRule object on success, false otherwise.
Depuis
1.7.0

Références $type.

Référencé par FormWrapper\loadRuleType(), et Form\loadRuleType().

◆ loadType()

static loadType (   $entity,
  $type,
  $new = true 
)
staticprotected

Method to load a form entity object given a type. Each type is loaded only once and then used as a prototype for other objects of same type. Please, use this method only with those entities which support types (forms don't support them).

Paramètres
string$entityThe entity.
string$typeThe entity type.
boolean$newFlag to toggle whether we should get a new instance of the object.
Renvoie
mixed Entity object on success, false otherwise.
Depuis
1.7.0

Références $class, $key, et $type.

◆ parseShowOnConditions()

static parseShowOnConditions (   $showOn,
  $formControl = null,
  $group = null 
)
static

Parse the show on conditions

Paramètres
string$showOnShow on conditions.
string$formControlForm name.
string$groupThe dot-separated form group path.
Renvoie
array Array with show on conditions.
Depuis
3.7.0

Références $field, et $groups.

Référencé par FormField\renderField().

Documentation des champs

◆ $entities

$entities = array('field' => array(), 'form' => array(), 'rule' => array())
staticprotected

◆ $paths

$paths
staticprotected

◆ $prefixes

$prefixes = array('field' => array(), 'form' => array(), 'rule' => array())
staticprotected

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