Свойство | Type | Description | |
---|---|---|---|
$_action | Horde_Form_Action | A {@link Horde_Form_Action} instance. | |
$_arrayVal | boolean | Whether this is an array variable. | |
$_autofilled | boolean | TODO | |
$_defValue | mixed | The default value. | |
$_disabled | boolean | Whether this variable is disabled. | |
$_hidden | boolean | Whether this is a hidden variable. | |
$_options | array | TODO | |
$description | string | A long description of the variable's purpose, special instructions, etc. | |
$form | Horde_Form | The form instance this variable is assigned to. | |
$help | string | The variable help text. | |
$humanName | string | A short description of this variable's purpose. | |
$readonly | boolean | Whether this is a readonly variable. | |
$required | boolean | Whether this is a required variable. | |
$type | Horde_Form_Type | A {@link Horde_Form_Type} instance. | |
$varName | string | The internally used name. |
Méthode | Description | |
---|---|---|
Horde_Form_Variable ( string $humanName, string $varName, Horde_Form_Type &$type, boolean $required, boolean $readonly = false, string $description = null ) | Variable constructor. | |
disable ( ) | Disables this variable. | |
getDefault ( ) : mixed | Returns this variable's default value. | |
getDescription ( ) : string | Returns this variable's long description. | |
getHelp ( ) : string | Returns the help text of this variable. | |
getHumanName ( ) : string | Return the short description of this variable. | |
getInfo ( Variables &$vars, mixed &$info ) : mixed | Processes the submitted value of this variable according to the rules of the variable type. | |
getOption ( string $option ) : mixed | Returns a variable option's value. | |
getType ( ) : Horde_Form_Type | Returns this variable's type. | |
getTypeName ( ) : string | Returns the name of this variable's type. | |
getValue ( Variables &$vars, integer $index = null ) : mixed | Returns the submitted or default value of this variable. | |
getValues ( ) : array | Returns the possible values of this variable. | |
getVarName ( ) : string | Returns the internally used variable name. | |
hasAction ( ) : boolean | Returns whether this variable has an attached action. | |
hasDescription ( ) : boolean | Returns whether this variable has a long description. | |
hasHelp ( ) : boolean | Returns whether this variable has some help text assigned. | |
hide ( ) | Makes this a hidden variable. | |
isArrayVal ( ) : boolean | Returns whether this is an array variable. | |
isDisabled ( ) : boolean | Returns whether this variable is disabled. | |
isHidden ( ) : boolean | Returns whether this is a hidden variable. | |
isReadonly ( ) : boolean | Returns whether this is a readonly variable. | |
isRequired ( ) : boolean | Returns whether this is a required variable. | |
isUpload ( ) : boolean | Returns whether this variable is to upload a file. | |
setAction ( Horde_Form_Action $action ) | Assigns an action to this variable. | |
setDefault ( mixed $value ) | Sets a default value for this variable. | |
setFormOb ( Horde_Form &$form ) | Assign this variable to the specified form. | |
setHelp ( string $help ) | Assigns a help text to this variable. | |
setOption ( string $option, mixed $val ) | Sets a variable option. | |
validate ( Variables &$vars, string &$message ) : boolean | Validates this variable. | |
wasChanged ( Variables &$vars ) : boolean | Returns whether this variable if it had the "trackchange" option set has actually been changed. |
public Horde_Form_Variable ( string $humanName, string $varName, Horde_Form_Type &$type, boolean $required, boolean $readonly = false, string $description = null ) | ||
$humanName | string | A short description of the variable's purpose. |
$varName | string | The internally used name. |
$type | Horde_Form_Type | A {@link Horde_Form_Type} instance. |
$required | boolean | Whether this is a required variable. |
$readonly | boolean | Whether this is a readonly variable. |
$description | string | A long description of the variable's purpose, special instructions, etc. |
public getDefault ( ) : mixed | ||
Résultat | mixed | This variable's default value. |
public getDescription ( ) : string | ||
Résultat | string | This variable's long description. |
public getHumanName ( ) : string | ||
Résultat | string | A short description |
public getType ( ) : Horde_Form_Type | ||
Résultat | Horde_Form_Type | This variable's {@link Horde_Form_Type} instance. |
public getTypeName ( ) : string | ||
Résultat | string | This variable's {@link Horde_Form_Type} name. |
public getVarName ( ) : string | ||
Résultat | string | This variable's internal name. |
public hasDescription ( ) : boolean | ||
Résultat | boolean | True if this variable has a long description. |
public isArrayVal ( ) : boolean | ||
Résultat | boolean | True if this an array variable. |
public isDisabled ( ) : boolean | ||
Résultat | boolean | True if this variable is disabled. |
public isReadonly ( ) : boolean | ||
Résultat | boolean | True if this a readonly variable. |
public isRequired ( ) : boolean | ||
Résultat | boolean | True if this is a required variable. |
$v = $form->addVariable('My Variable', 'var1', 'text', false);
$v->setAction(Horde_Form_Action::factory('submit'));
public setAction ( Horde_Form_Action $action ) | ||
$action | Horde_Form_Action | A {@link Horde_Form_Action} instance. |
public setDefault ( mixed $value ) | ||
$value | mixed | A variable value. |
public setFormOb ( Horde_Form &$form ) | ||
$form | Horde_Form | The form instance to assign this variable to. |
public validate ( Variables &$vars, string &$message ) : boolean | ||
$vars | Variables | The {@link Variables} instance of the submitted form. |
$message | string | A variable passed by reference that will be assigned a descriptive error message if validation failed. |
Résultat | boolean | True if the variable validated. |
public wasChanged ( Variables &$vars ) : boolean | ||
$vars | Variables | The {@link Variables} instance of the submitted form. |
Résultat | boolean | Null if this variable doesn't have the "trackchange" option set or the form wasn't submitted yet. A boolean indicating whether the variable was changed otherwise. |
public Horde_Form_Action $_action | ||
Résultat | Horde_Form_Action |
public bool $_arrayVal | ||
Résultat | boolean |
public bool $_disabled | ||
Résultat | boolean |
public string $description | ||
Résultat | string |
public Horde_Form $form | ||
Résultat | Horde_Form |
public string $humanName | ||
Résultat | string |
public bool $readonly | ||
Résultat | boolean |
public bool $required | ||
Résultat | boolean |
public Horde_Form_Type $type | ||
Résultat | Horde_Form_Type |