CWIS Developer Documentation
|
Convenience class for generating a set of HTML radio button form elements. More...
Public Member Functions | |
__construct ($ResultVar, array $Options, $SelectedValue=NULL) | |
Class constructor. More... | |
PrintHtml () | |
Print HTML for set. More... | |
GetHtml () | |
Get HTML for set. More... | |
DisabledOptions ($Options=NULL) | |
Get/set disabled options. More... | |
SelectedValue ($NewValue=NULL) | |
Get/set currently selected value or array of currently selected values. More... | |
PrintIfEmpty ($NewValue=NULL) | |
Get/set whether list should be output even if there are no items. More... | |
Disabled ($NewValue=NULL) | |
Get/set whether the whole option list is editable. More... | |
Convenience class for generating a set of HTML radio button form elements.
Definition at line 13 of file HtmlRadioButtonSet.php.
HtmlRadioButtonSet::__construct | ( | $ResultVar, | |
array | $Options, | ||
$SelectedValue = NULL |
|||
) |
Class constructor.
string | $ResultVar | Name of form variable for select element. |
array | $Options | Array of options, with form values for the array index and labels for the array values. |
mixed | $SelectedValue | Currently selected form value or array of currently selected form values. (OPTIONAL) |
Definition at line 26 of file HtmlRadioButtonSet.php.
References SelectedValue().
HtmlRadioButtonSet::Disabled | ( | $NewValue = NULL | ) |
Get/set whether the whole option list is editable.
NOTE: When the list is not editable, values for it are not submitted with the form. This is distinct from whether individual options are disabled.
bool | $NewValue | If TRUE, list is not editable. |
Definition at line 161 of file HtmlRadioButtonSet.php.
Referenced by GetHtml().
HtmlRadioButtonSet::DisabledOptions | ( | $Options = NULL | ) |
Get/set disabled options.
mixed | $Options | Option or array of options to disable. If a single option then it should be the value and will be added to any existing disabled options, and if an array it should have the values for the index and will replace the current list of disabled options. (OPTIONAL) |
Definition at line 105 of file HtmlRadioButtonSet.php.
Referenced by GetHtml().
HtmlRadioButtonSet::GetHtml | ( | ) |
Get HTML for set.
Definition at line 48 of file HtmlRadioButtonSet.php.
References Disabled(), DisabledOptions(), PrintIfEmpty(), and SelectedValue().
Referenced by PrintHtml().
HtmlRadioButtonSet::PrintHtml | ( | ) |
HtmlRadioButtonSet::PrintIfEmpty | ( | $NewValue = NULL | ) |
Get/set whether list should be output even if there are no items.
If this is set to FALSE and there are no items in the list, GetHtml() will return an empty string and PrintHtml() will print nothing. Defaults to TRUE.
bool | $NewValue | If TRUE, HTML will be returned/printed even if there are no items in the list. (OPTIONAL) |
Definition at line 145 of file HtmlRadioButtonSet.php.
Referenced by GetHtml().
HtmlRadioButtonSet::SelectedValue | ( | $NewValue = NULL | ) |
Get/set currently selected value or array of currently selected values.
mixed | $NewValue | Currently selected form value or array of currently selected form values. (OPTIONAL) |
Definition at line 127 of file HtmlRadioButtonSet.php.
Referenced by __construct(), and GetHtml().