
Public Member Functions | |
| setOptions (array $options) | |
| Set available options. | |
| addOption ($option, $key=NULL) | |
| Adds another option. | |
| getOptions () | |
| Provides available options. | |
| setUseSubmittedValue ($useSubmittedValue=true) | |
| Sets the return value of getUseSubmittedValue(). | |
| getForm () | |
| Provides the form this field resides in. | |
| __clone () | |
| Called after this object was cloned (on the newly created object). | |
| getContainer () | |
| setContainer (spunQ_IFieldContainer $container) | |
| getName () | |
| getTypePath () | |
| getTypePathPart () | |
| addConverter (spunQ_IFieldValueConverter $converter) | |
| addValidator (spunQ_IFieldValidator $validator) | |
| getConverters () | |
| getValidators () | |
| getHtmlId ($postfix= '') | |
| getHtmlName () | |
| getUseSubmittedValue () | |
| show ($value=NULL, $template=NULL, $templateParameters=array(), $htmlIdPostFix= '') | |
| showValidatorsJs () | |
| submittedValueValid () | |
| getSubmittedRawValue () | |
| getSubmittedValue () | |
| getValue () | |
| getDisplayValue ($originalValue) | |
| getValidationMessages () | |
| getFieldByPath ($path) | |
| _processSubmission (&$rawValue) | |
Static Public Member Functions | |
| static | normalizeTemplateCssParameter ($class) |
Normalizes the $class parameter passed to a field template. | |
Protected Member Functions | |
| spunQToRaw ($value) | |
| Will convert a spunQ value to a raw value using registered converters. | |
| rawToSpunQ (&$value) | |
| Partial implementation of _processSubmission(). | |
| getDefaultTemplate () | |
| Provides a template to be used if the parameter was not passed to show(). | |
Protected Attributes | |
| $options = array() | |
| Available options. | |
| $name | |
| Name of this field. | |
| $container | |
| The container this field is residing in. | |
| $useSubmittedValue = true | |
| Whether the submitted value should override the default value. | |
| $converters = array() | |
| The converters that have been registered with this field. | |
| $validators = array() | |
| Registered field validators. | |
| $validationMessages = NULL | |
| Messages generated by validators and converters. | |
| $submittedValue = NULL | |
| Value that was submitted for this field. | |
| $submittedRawValue = NULL | |
| Raw value that was submitted for this field. | |
Definition at line 6 of file ChoiceField.class.php.
| spunQ_Field::__clone | ( | ) | [inherited] |
Called after this object was cloned (on the newly created object).
Will unset its container, so setContainer() must be called on cloned spunQ_Fields.
Definition at line 133 of file Field.class.php.
| spunQ_ChoiceField::addOption | ( | $ | option, | |
| $ | key = NULL | |||
| ) |
Adds another option.
| $option | A new option the user may choose. | |
| $key | Additional parameter that may be provided. If it is present, this will be the raw value of this option. Otherwise the option will receive a random numeric raw value. |
$this Definition at line 35 of file ChoiceField.class.php.
| spunQ_Field::getDefaultTemplate | ( | ) | [protected, inherited] |
Provides a template to be used if the parameter was not passed to show().
The show() implementation in spunQ_IField uses this value.
Definition at line 391 of file Field.class.php.
| spunQ_Field::getForm | ( | ) | [inherited] |
Provides the form this field resides in.
Definition at line 120 of file Field.class.php.
| spunQ_ChoiceField::getOptions | ( | ) |
| static spunQ_Field::normalizeTemplateCssParameter | ( | $ | class | ) | [static, inherited] |
Normalizes the $class parameter passed to a field template.
Many field templates have an optional parameter called $class that can be passed either of the following:
NULL indicating, that no class declaration is to be added.| $class | The value that was passed to the template. Either of the types mentioned in the function description. |
class attribute of an html node. | spunQ_HtmlException | If the parameter has an unexpected type or an invalid css declaration. |
Definition at line 20 of file Field.class.php.
| spunQ_Field::rawToSpunQ | ( | &$ | value | ) | [protected, inherited] |
Partial implementation of _processSubmission().
| $value | Same as for _processSubmission(). |
Definition at line 366 of file Field.class.php.
| spunQ_ChoiceField::setOptions | ( | array $ | options | ) |
Set available options.
$this Definition at line 19 of file ChoiceField.class.php.
| spunQ_Field::setUseSubmittedValue | ( | $ | useSubmittedValue = true |
) | [inherited] |
Sets the return value of getUseSubmittedValue().
| $useSubmittedValue | The new value for getUseSubmittedValue() |
$this Definition at line 111 of file Field.class.php.
| spunQ_Field::spunQToRaw | ( | $ | value | ) | [protected, inherited] |
Will convert a spunQ value to a raw value using registered converters.
| $value | The value to convert |
Definition at line 353 of file Field.class.php.
spunQ_Field::$container [protected, inherited] |
spunQ_Field::$converters = array() [protected, inherited] |
The converters that have been registered with this field.
Definition at line 63 of file Field.class.php.
spunQ_Field::$name [protected, inherited] |
spunQ_ChoiceField::$options = array() [protected] |
spunQ_Field::$submittedRawValue = NULL [protected, inherited] |
Raw value that was submitted for this field.
Definition at line 89 of file Field.class.php.
spunQ_Field::$submittedValue = NULL [protected, inherited] |
Value that was submitted for this field.
Initialized in _processSubmission().
Definition at line 83 of file Field.class.php.
spunQ_Field::$useSubmittedValue = true [protected, inherited] |
Whether the submitted value should override the default value.
In other words: If this is set to true, the field will display the value that was submitted previously instead of the default value.
Definition at line 57 of file Field.class.php.
spunQ_Field::$validationMessages = NULL [protected, inherited] |
Messages generated by validators and converters.
Initialized in _processSubmission().
Definition at line 76 of file Field.class.php.
spunQ_Field::$validators = array() [protected, inherited] |
Registered field validators.
Definition at line 69 of file Field.class.php.
1.5.9