Joomla CMS  4.2.2
Documentation des API du CMS Joomla en version 4.2.2
Référence de la classe FormHelper

Fonctions membres publiques statiques

static loadFieldType ($type, $new=true)
 
static loadRuleType ($type, $new=true)
 
static loadFilterType ($type, $new=true)
 
static loadFieldClass ($type)
 
static loadRuleClass ($type)
 
static loadFilterClass ($type)
 
static addFieldPath ($new=null)
 
static addFormPath ($new=null)
 
static addRulePath ($new=null)
 
static addFilterPath ($new=null)
 
static addFieldPrefix ($new=null)
 
static addFormPrefix ($new=null)
 
static addRulePrefix ($new=null)
 
static addFilterPrefix ($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(), 'filter' => array())
 
static $entities = array('field' => array(), 'form' => array(), 'rule' => array(), 'filter' => 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 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().

◆ addFilterPath()

static addFilterPath (   $new = null)
static

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

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

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

◆ addFilterPrefix()

static addFilterPrefix (   $new = null)
static

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

Paramètres
mixed$newA namespace or array of namespaces to add.
Renvoie
array The list of namespaces that have been added.
Depuis
4.0.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 Form\addFormPath(), et FileModel\getForm().

◆ 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 Form\addRulePath(), et FieldModel\checkDefaultValue().

◆ 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, $i, $n, $name, $path, $prefix, $type, Path\find(), Normalise\toSpaceSeparated(), et StringHelper\ucfirst().

◆ loadFieldClass()

static loadFieldClass (   $type)
static

Attempt to import the FormField class file if it isn't already imported. You can use this method outside of Form 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.

◆ 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 Form\loadField().

◆ loadFilterClass()

static loadFilterClass (   $type)
static

Attempt to import the FormFilter class file if it isn't already imported. You can use this method outside of Form for loading a filter for inheritance or composition.

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

Références $type.

◆ loadFilterType()

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

Method to load a form filter 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
FormFilterInterface|boolean FormRule object on success, false otherwise.
Depuis
4.0.0

Références $type.

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

◆ loadRuleClass()

static loadRuleClass (   $type)
static

Attempt to import the FormRule class file if it isn't already imported. You can use this method outside of Form 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.

◆ 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 FieldModel\checkDefaultValue(), et FormField\validate().

◆ 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 ListField\getOptions(), et FormField\renderField().

Documentation des champs

◆ $entities

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

◆ $paths

$paths
staticprotected

◆ $prefixes

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

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