Liste de tous les membres
Fonctions membres protégées statiques |
static | loadType ($entity, $type, $new=true) |
static | loadClass ($entity, $type) |
static | addPath ($entity, $new=null) |
Description détaillée
Définition à la ligne 23 du fichier helper.php.
Documentation des fonctions membres
static JFormHelper::addFieldPath |
( |
|
$new = null | ) |
|
|
static |
Method to add a path to the list of field include paths.
- Paramètres:
-
mixed | $new | A path or array of paths to add. |
- Renvoie:
- array The list of paths that have been added.
- Depuis:
- 11.1
Définition à la ligne 237 du fichier helper.php.
Référencé par JForm\addFieldPath().
static JFormHelper::addFormPath |
( |
|
$new = null | ) |
|
|
static |
Method to add a path to the list of form include paths.
- Paramètres:
-
mixed | $new | A path or array of paths to add. |
- Renvoie:
- array The list of paths that have been added.
- Depuis:
- 11.1
Définition à la ligne 251 du fichier helper.php.
Référencé par JForm\addFormPath().
static JFormHelper::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 | $entity | Form's entity name for which paths will be added. |
mixed | $new | A path or array of paths to add. |
- Renvoie:
- array The list of paths that have been added.
- Depuis:
- 11.1
Définition à la ligne 281 du fichier helper.php.
{
$paths = &self::$paths[$entity];
{
$entity_plural = $entity . 's';
$paths[] = __DIR__ .
'/' . $entity_plural;
}
settype($new, 'array');
foreach ($new as $path)
{
{
array_unshift(
$paths, trim($path));
}
}
}
static JFormHelper::addRulePath |
( |
|
$new = null | ) |
|
|
static |
Method to add a path to the list of rule include paths.
- Paramètres:
-
mixed | $new | A path or array of paths to add. |
- Renvoie:
- array The list of paths that have been added.
- Depuis:
- 11.1
Définition à la ligne 265 du fichier helper.php.
Référencé par JForm\addRulePath().
static JFormHelper::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 | $entity | One of the form entities (field or rule). |
string | $type | Type of an entity. |
- Renvoie:
- mixed Class name on success or false otherwise.
- Depuis:
- 11.1
Définition à la ligne 169 du fichier helper.php.
Références JPath\find(), et JString\ucfirst().
{
if (strpos($type, '.'))
{
list($prefix, $type) = explode('.', $type);
}
else
{
$prefix = 'J';
}
if (class_exists($class))
{
return $class;
}
if ($pos = strpos($type, '_'))
{
for ($i = 0, $n = count(
$paths); $i < $n; $i++)
{
$path =
$paths[$i] .
'/' . strtolower(substr($type, 0, $pos));
{
}
}
$type = substr($type, $pos + 1);
}
$type = strtolower($type) . '.php';
{
{
require_once $file;
if (class_exists($class))
{
break;
}
}
}
return class_exists($class) ? $class : false;
}
static JFormHelper::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 | $type | Type of a field whose class should be loaded. |
- Renvoie:
- mixed Class name on success or false otherwise.
- Depuis:
- 11.1
Définition à la ligne 137 du fichier helper.php.
static JFormHelper::loadFieldType |
( |
|
$type, |
|
|
|
$new = true |
|
) |
| |
|
static |
Method to load a form field object given a type.
- Paramètres:
-
string | $type | The field type. |
boolean | $new | Flag to toggle whether we should get a new instance of the object. |
- Renvoie:
- mixed JFormField object on success, false otherwise.
- Depuis:
- 11.1
Définition à la ligne 68 du fichier helper.php.
Référencé par JForm\loadFieldType().
static JFormHelper::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 | $type | Type of a rule whose class should be loaded. |
- Renvoie:
- mixed Class name on success or false otherwise.
- Depuis:
- 11.1
Définition à la ligne 152 du fichier helper.php.
static JFormHelper::loadRuleType |
( |
|
$type, |
|
|
|
$new = true |
|
) |
| |
|
static |
Method to load a form rule object given a type.
- Paramètres:
-
string | $type | The rule type. |
boolean | $new | Flag to toggle whether we should get a new instance of the object. |
- Renvoie:
- mixed JFormRule object on success, false otherwise.
- Depuis:
- 11.1
Définition à la ligne 83 du fichier helper.php.
Référencé par JForm\loadRuleType().
static JFormHelper::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 | $entity | The entity. |
string | $type | The entity type. |
boolean | $new | Flag to toggle whether we should get a new instance of the object. |
- Renvoie:
- mixed Entity object on success, false otherwise.
- Depuis:
- 11.1
Définition à la ligne 101 du fichier helper.php.
{
$types = &self::$entities[$entity];
$key = md5($type);
if (isset($types[$key]) && $new === false)
{
return $types[$key];
}
if ($class !== false)
{
$types[$key] = new $class;
return $types[$key];
}
else
{
return false;
}
}
Documentation des données membres
JFormHelper::$entities = array() |
|
staticprotected |
La documentation de cette classe a été générée à partir du fichier suivant :