Liste de tous les membres
Fonctions membres publiques |
| test (SimpleXMLElement $element, $value, $group=null, JRegistry $input=null, JForm $form=null) |
Description détaillée
Définition à la ligne 19 du fichier rules.php.
Documentation des fonctions membres
JFormRuleRules::getFieldActions |
( |
SimpleXMLElement |
$element | ) |
|
|
protected |
Method to get the list of possible permission action names for the form field.
- Paramètres:
-
SimpleXMLElement | $element | The SimpleXMLElement object representing the <field> tag for the form field object. |
- Renvoie:
- array A list of permission action names from the form field element definition.
- Depuis:
- 11.1
Définition à la ligne 86 du fichier rules.php.
Références JAccess\getActions().
{
$actions = array();
$section = $element['section'] ? (string) $element['section'] : '';
$component = $element['component'] ? (string) $element['component'] : '';
foreach ($elActions as $item)
{
$actions[] = $item->name;
}
foreach ($element->children() as $el)
{
if ($el->getName() == 'action')
{
$actions[] = (string) $el['name'];
}
}
return $actions;
}
JFormRuleRules::getValueActions |
( |
|
$value | ) |
|
|
protected |
Method to get the list of permission action names from the form field value.
- Paramètres:
-
mixed | $value | The form field value to validate. |
- Renvoie:
- array A list of permission action names from the form field value.
- Depuis:
- 11.1
Définition à la ligne 63 du fichier rules.php.
{
$actions = array();
foreach ((array) $value as $name => $rules)
{
$actions[] = $name;
}
return $actions;
}
JFormRuleRules::test |
( |
SimpleXMLElement |
$element, |
|
|
|
$value, |
|
|
|
$group = null , |
|
|
JRegistry |
$input = null , |
|
|
JForm |
$form = null |
|
) |
| |
Method to test the value.
- Paramètres:
-
SimpleXMLElement | $element | The SimpleXMLElement object representing the <field> tag for the form field object. |
mixed | $value | The form field value to validate. |
string | $group | The field name group control value. This acts as as an array container for the field. For example if the field has name="foo" and the group value is set to "bar" then the full field name would end up being "bar[foo]". |
JRegistry | $input | An optional JRegistry object with the entire data set to validate against the entire form. |
JForm | $form | The form object for which the field is being tested. |
- Renvoie:
- boolean True if the value is valid, false otherwise.
- Depuis:
- 11.1
Réimplémentée à partir de JFormRule.
Définition à la ligne 36 du fichier rules.php.
{
foreach ($valueActions as $action)
{
if (!in_array($action, $fieldActions))
{
return false;
}
}
return true;
}
La documentation de cette classe a été générée à partir du fichier suivant :