Inherited by SFCategoryInput, SFCheckboxInput, SFComboBoxInput, SFDateInput, SFEnumInput, SFTextAreaInput, and SFTextInput.
Public Member Functions | |
| __construct ($input_number, $cur_value, $input_name, $disabled, $other_args) | |
| Constructor for the SFFormInput class. | |
| getDefaultParameters () | |
| Return an array of the default parameters for this input where the parameter name is the key while the parameter value is the value. | |
| getHtmlText () | |
| Returns the HTML code to be included in the output page for this input. | |
| getJsInitFunctionData () | |
| Returns the name and parameters for the initialization JavaScript function for this input type, if any. | |
| getJsValidationFunctionData () | |
| Returns the name and parameters for the validation JavaScript functions for this input type, if any. | |
| getResourceModuleNames () | |
| Returns the names of the resource modules this input type uses. | |
| addJsInitFunctionData ($name, $param= 'null') | |
| For each input type one or more JavaScript initialization functions may be specified. | |
| addJsValidationFunctionData ($name, $param= 'null') | |
| For each input type one or more JavaScript validation functions may be specified. | |
Static Public Member Functions | |
| static | getName () |
| Returns the name of the input type this class handles. | |
| static | getHandledPropertyTypes () |
| Returns the set of SMW property types which this input can handle. | |
| static | getParameters () |
| Returns the set of parameters for this form input. | |
| static | canHandleLists () |
| static | getDefaultPropTypes () |
| Returns the set of SMW property types for which this input is meant to be the default one - ideally, no more than one input should declare itself the default for any specific type. | |
| static | getDefaultPropTypeLists () |
| Returns the set of SMW property types for which this input is meant to be the default one - ideally, no more than one input should declare itself the default for any specific type. | |
| static | getOtherPropTypesHandled () |
| Returns the set of SMW property types which this input can handle, but for which it isn't the default input. | |
| static | getOtherPropTypeListsHandled () |
| Returns the set of SMW property types which this input can handle, but for which it isn't the default input. | |
| static | getHTML ($cur_value, $input_name, $is_mandatory, $is_disabled, $other_args) |
| Method to make new style input types compatible with old-style call from the SF parser. | |
Protected Attributes | |
| $mInputNumber | |
| $mCurrentValue | |
| $mInputName | |
| $mIsMandatory | |
| $mIsDisabled | |
| $mOtherArgs | |
| $mJsInitFunctionData = array() | |
| $mJsValidationFunctionData = array() | |
Definition at line 23 of file SF_FormInput.php.
| SFFormInput::__construct | ( | $ | input_number, | |
| $ | cur_value, | |||
| $ | input_name, | |||
| $ | disabled, | |||
| $ | other_args | |||
| ) |
Constructor for the SFFormInput class.
| String | $input_number The number of the input in the form. For a simple HTML input element this should end up in the id attribute in the format 'input_<number>'. | |
| String | $cur_value The current value of the input field. For a simple HTML input element this should end up in the value attribute. | |
| String | $input_name The name of the input. For a simple HTML input element this should end up in the name attribute. | |
| Array | $other_args An associative array of other parameters that were present in the input definition. |
Reimplemented in SFTextAreaInput.
Definition at line 51 of file SF_FormInput.php.
| static SFFormInput::getName | ( | ) | [static] |
Returns the name of the input type this class handles.
This is the name to be used in the field definition for the "input type" parameter.
Reimplemented in SFCategoriesInput, SFCategoryInput, SFCheckboxesInput, SFCheckboxInput, SFComboBoxInput, SFDateInput, SFDateTimeInput, SFDropdownInput, SFListBoxInput, SFRadioButtonInput, SFTextAreaInput, SFTextAreaWithAutocompleteInput, SFTextInput, SFTextWithAutocompleteInput, and SFYearInput.
Definition at line 71 of file SF_FormInput.php.
| static SFFormInput::getHandledPropertyTypes | ( | ) | [static] |
Returns the set of SMW property types which this input can handle.
See SMW's SMW_DataValueFactory.php
Definition at line 81 of file SF_FormInput.php.
| static SFFormInput::getParameters | ( | ) | [static] |
Returns the set of parameters for this form input.
Reimplemented in SFCategoryInput, SFCheckboxInput, SFComboBoxInput, SFDateTimeInput, SFEnumInput, SFListBoxInput, SFMultiEnumInput, SFTextAreaInput, SFTextAreaWithAutocompleteInput, SFTextInput, SFTextWithAutocompleteInput, and SFYearInput.
Definition at line 88 of file SF_FormInput.php.
| SFFormInput::getDefaultParameters | ( | ) |
Return an array of the default parameters for this input where the parameter name is the key while the parameter value is the value.
Definition at line 124 of file SF_FormInput.php.
| SFFormInput::getHtmlText | ( | ) |
Returns the HTML code to be included in the output page for this input.
Ideally this HTML code should provide a basic functionality even if the browser is not JavaScript capable. I.e. even without JavaScript the user should be able to input values.
This function is not used yet.
Reimplemented in SFCategoriesInput, SFCategoryInput, SFCheckboxesInput, SFCheckboxInput, SFComboBoxInput, SFDateInput, SFDateTimeInput, SFDropdownInput, SFListBoxInput, SFRadioButtonInput, SFTextAreaInput, SFTextInput, SFTextWithAutocompleteInput, and SFYearInput.
Definition at line 137 of file SF_FormInput.php.
| static SFFormInput::canHandleLists | ( | ) | [static] |
Definition at line 145 of file SF_FormInput.php.
| SFFormInput::getJsInitFunctionData | ( | ) |
Returns the name and parameters for the initialization JavaScript function for this input type, if any.
This function is not used yet.
Definition at line 155 of file SF_FormInput.php.
Referenced by getHTML().
| SFFormInput::getJsValidationFunctionData | ( | ) |
Returns the name and parameters for the validation JavaScript functions for this input type, if any.
This function is not used yet.
Definition at line 165 of file SF_FormInput.php.
Referenced by getHTML().
| SFFormInput::getResourceModuleNames | ( | ) |
Returns the names of the resource modules this input type uses.
Returns the names of the modules as an array or - if there is only one module - as a string.
Reimplemented in SFTextAreaInput.
Definition at line 178 of file SF_FormInput.php.
| SFFormInput::addJsInitFunctionData | ( | $ | name, | |
| $ | param = 'null' | |||
| ) |
For each input type one or more JavaScript initialization functions may be specified.
This function is not used yet.
They are called to initialize the input after the page html has loaded (or for "multiple" templates after the page fragment has loaded).
The JavaScript function specified here must be in the top level scope of the document. When it is called it will get the input's id attribute as the first parameter and the specified param as the second.
Examples:
Adding initFoo like this: addJsInitFunctionData( "initFoo", "'bar'" ); will result in this JavaScript call: initFoo( inputID, 'bar' );.
Adding initFoo like this: addJsInitFunctionData( "initFoo", "array('bar', 'baz'" ); will result in this JavaScript call: initFoo( inputID, array('bar', 'baz') );.
| String | $name The name of the initialization function. | |
| String | $param The parameter passed to the initialization function. |
Definition at line 206 of file SF_FormInput.php.
Referenced by SFTextAreaInput::__construct().
| SFFormInput::addJsValidationFunctionData | ( | $ | name, | |
| $ | param = 'null' | |||
| ) |
For each input type one or more JavaScript validation functions may be specified.
Not used yet.
They are called to validate the input before the form is submitted for saving or preview.
The JavaScript function specified here must be in the top level scope of the document. When it is called it will get the input's id attribute as the first parameter and the specified param as the second.
Examples:
Adding validateFoo like this: addJsValidationFunctionData( "initFoo", "'bar'" ); will result in this JavaScript call: validateFoo( inputID, 'bar' );.
Adding validateFoo like this: addJsValidationFunctionData( "initFoo", "array('bar', 'baz'" ); will result in this JavaScript call: validateFoo( inputID, array('bar', 'baz') );.
| String | $name The name of the initialization function. | |
| String | $param The parameter passed to the initialization function. |
Definition at line 234 of file SF_FormInput.php.
| static SFFormInput::getDefaultPropTypes | ( | ) | [static] |
Returns the set of SMW property types for which this input is meant to be the default one - ideally, no more than one input should declare itself the default for any specific type.
Reimplemented in SFCheckboxInput, SFDateInput, SFDateTimeInput, SFDropdownInput, SFTextAreaInput, SFTextAreaWithAutocompleteInput, SFTextInput, SFTextWithAutocompleteInput, and SFYearInput.
Definition at line 247 of file SF_FormInput.php.
| static SFFormInput::getDefaultPropTypeLists | ( | ) | [static] |
Returns the set of SMW property types for which this input is meant to be the default one - ideally, no more than one input should declare itself the default for any specific type.
Reimplemented in SFCheckboxesInput, SFTextInput, SFTextWithAutocompleteInput, and SFYearInput.
Definition at line 260 of file SF_FormInput.php.
| static SFFormInput::getOtherPropTypesHandled | ( | ) | [static] |
Returns the set of SMW property types which this input can handle, but for which it isn't the default input.
Reimplemented in SFCategoryInput, SFComboBoxInput, SFDateTimeInput, SFDropdownInput, SFEnumInput, SFMultiEnumInput, SFTextAreaInput, SFTextInput, SFTextWithAutocompleteInput, and SFYearInput.
Definition at line 271 of file SF_FormInput.php.
| static SFFormInput::getOtherPropTypeListsHandled | ( | ) | [static] |
Returns the set of SMW property types which this input can handle, but for which it isn't the default input.
Reimplemented in SFCategoriesInput, SFCheckboxesInput, SFMultiEnumInput, SFTextAreaInput, SFTextInput, SFTextWithAutocompleteInput, and SFYearInput.
Definition at line 282 of file SF_FormInput.php.
| static SFFormInput::getHTML | ( | $ | cur_value, | |
| $ | input_name, | |||
| $ | is_mandatory, | |||
| $ | is_disabled, | |||
| $ | other_args | |||
| ) | [static] |
Method to make new style input types compatible with old-style call from the SF parser.
Reimplemented in SFCategoriesInput, SFCategoryInput, SFCheckboxesInput, SFCheckboxInput, SFComboBoxInput, SFDateInput, SFDateTimeInput, SFDropdownInput, SFListBoxInput, SFRadioButtonInput, SFTextInput, SFTextWithAutocompleteInput, and SFYearInput.
Definition at line 294 of file SF_FormInput.php.
References getJsInitFunctionData(), and getJsValidationFunctionData().
Referenced by SFFormPrinter::formHTML().
SFFormInput::$mInputNumber [protected] |
Definition at line 25 of file SF_FormInput.php.
SFFormInput::$mCurrentValue [protected] |
Definition at line 26 of file SF_FormInput.php.
SFFormInput::$mInputName [protected] |
Definition at line 27 of file SF_FormInput.php.
SFFormInput::$mIsMandatory [protected] |
Definition at line 28 of file SF_FormInput.php.
SFFormInput::$mIsDisabled [protected] |
Definition at line 29 of file SF_FormInput.php.
SFFormInput::$mOtherArgs [protected] |
Definition at line 30 of file SF_FormInput.php.
SFFormInput::$mJsInitFunctionData = array() [protected] |
Definition at line 32 of file SF_FormInput.php.
SFFormInput::$mJsValidationFunctionData = array() [protected] |
Definition at line 33 of file SF_FormInput.php.
1.5.6