CWIS Developer Documentation

- Home
- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | List of all members
HtmlRadioButtonSet Class Reference

Convenience class for generating a set of HTML radio button form elements. More...

## Public Member Functions
| __construct ($ResultVar, $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...

## Detailed Description

Convenience class for generating a set of HTML radio button form elements.

Definition at line 13 of file HtmlRadioButtonSet.php.

## Constructor & Destructor Documentation

HtmlRadioButtonSet::__construct | ( |  | $ResultVar,
|  |  | $Options,
|  |  | $SelectedValue = `NULL`
| ) |  |

Class constructor.

Parameters

  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().

## Member Function Documentation

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.

Parameters

  bool | $NewValue | If TRUE, list is not editable.

Returns
  bool TRUE if list will not be editabled, otherwise FALSE.

Definition at line 158 of file HtmlRadioButtonSet.php.

Referenced by GetHtml().

Here is the caller graph for this function:

HtmlRadioButtonSet::DisabledOptions | ( |  | $Options = `NULL` | ) |

Get/set disabled options.

Parameters

  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 102 of file HtmlRadioButtonSet.php.

Referenced by GetHtml().

Here is the caller graph for this function:

HtmlRadioButtonSet::GetHtml | ( |  | ) |

Get HTML for set.

Returns
  string Generated HTML.

Definition at line 45 of file HtmlRadioButtonSet.php.

References Disabled(), DisabledOptions(), PrintIfEmpty(), and SelectedValue().

Referenced by PrintHtml().

Here is the caller graph for this function:

HtmlRadioButtonSet::PrintHtml | ( |  | ) |

Print HTML for set.

Definition at line 36 of file HtmlRadioButtonSet.php.

References GetHtml().

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.

Parameters

  bool | $NewValue | If TRUE, HTML will be returned/printed even if there are no items in the list. (OPTIONAL)

Returns
  bool TRUE if empty list will be printed, otherwise FALSE.

Definition at line 142 of file HtmlRadioButtonSet.php.

Referenced by GetHtml().

Here is the caller graph for this function:

HtmlRadioButtonSet::SelectedValue | ( |  | $NewValue = `NULL` | ) |

Get/set currently selected value or array of currently selected values.

Parameters

  mixed | $NewValue | Currently selected form value or array of currently selected form values. (OPTIONAL)

Returns
  mixed Selected value or array of currently selected values.

Definition at line 124 of file HtmlRadioButtonSet.php.

Referenced by __construct(), and GetHtml().

Here is the caller graph for this function:

The documentation for this class was generated from the following file:

- lib/ScoutLib/HtmlRadioButtonSet.php