Docs For Class FENestedListBox

## Class FENestedListBox

Description

This class builds a nested select box that is used to select an entry from nested levels.

NOTE: The data array must be in the format array("test" => "testvalue", "nestedtest" => array("value" => "nestedtestvalue", "items" => array( "foo" => "foovalue", "bar" => "barvalue"));

Example $data = array("Test" => 1, "Foo" => array("value" => 2, "items" => array("Blah" => 3, "php" => 4)), "Bar" => array("value" => 5, "items" => array("testing" => array("value" => 6, "items" => array("ugh" => 7)), "again" => 8)));

would result in

<select > <option value="1">Test</option> <option value="2">Foo</option> <option value="3">&nbsp;&nbsp;Blah</option> <option value="4">&nbsp;&nbsp;php</option> <option value="5">Bar</option> <option value="6">&nbsp;&nbsp;testing</option> <option value="7">&nbsp;&nbsp;&nbsp;&nbsp;ugh</option> <option value="8">&nbsp;&nbsp;again</option> </select>

- copyright: LGPL - See LICENCE
- author: Walter A. Boring IV <waboring@buildabetterweb.com>

Located in /form/form_elements/FEListBox.inc (line 137)

    FormElement
       |
       --FEBoxElement
          |
          --FEDataList
             |
             --FENestedListBox

Method Summary
object get_element ()
string get_value_text ()
void validate (FormValidation &$_FormValidation)
none _add_array (array $layer_arr, int $level, SELECTtag &$tag)
void _array_search_r (mixed $needle, mixed $haystack, mixed &$item)
OPTIONtag _build_option (string $name, string $value, int $level)
string _layer_name (string $name, int $level)
Variables

#### Inherited Variables

Inherited from FEDataList

> FEDataList::$_data_list
> FEDataList::$_disabled_items

Inherited from FEBoxElement

> FEBoxElement::$_height
> FEBoxElement::$_width

Inherited from FormElement

> FormElement::$onBlurJS
> FormElement::$onChangeJS
> FormElement::$onClickJS
> FormElement::$onFocusJS
> FormElement::$onSubmitJS
> FormElement::$_attributes
> FormElement::$_element_name
> FormElement::$_errors
> FormElement::$_error_message
> FormElement::$_form_name
> FormElement::$_has_error
> FormElement::$_has_form_on_submit
> FormElement::$_is_disabled
> FormElement::$_is_readonly
> FormElement::$_is_required
> FormElement::$_label_colon_flag
> FormElement::$_label_text
> FormElement::$_required_field_marker
> FormElement::$_slave_elements
> FormElement::$_stripslashes
> FormElement::$_style_attributes
> FormElement::$_validation_enabled
> FormElement::$_value

Methods
get_element (line 145)

This function builds and returns the form element object

object get_element ()

Redefinition of:

FormElement::get_element()
  This function builds and returns the form element object. This method ignores the readonly flag.

get_value_text (line 217)

This provides a method

for the FormContent to get access to the text associated with a field. This is only available on FormElements that have text associated with a field. It is used during Confirmation

- return: - the text associated

string get_value_text ()

Redefinition of:

FEDataList::get_value_text()
  This provides a method

validate (line 168)

This function is responsible for performing complete validation and setting the appropriate error message in case of a failed validation

void validate (FormValidation &$_FormValidation)

- FormValidation &$_FormValidation: object

Redefinition of:

FEDataList::validate()
  This function is responsible for performing complete validation and setting the appropriate error message in case of a failed validation

_add_array (line 233)

This is a recursive function used to add an array of layers to the select box.

none _add_array (array $layer_arr, int $level, SELECTtag &$tag)

- array $layer_arr: - the next level of name=>value pairs
- int $level: - the level
- SELECTtag &$tag: - the SELECTtag object to add the options

_array_search_r (line 180)
void _array_search_r (mixed $needle, mixed $haystack, mixed &$item)
_build_option (line 257)

This method builds the actual OPTIONtag object

- return: object

OPTIONtag _build_option (string $name, string $value, int $level)

- string $name: the name
- string $value: the value
- int $level: the level

_layer_name (line 279)

This builds a layer's name

- return: the new name

string _layer_name (string $name, int $level)

- string $name: - original name
- int $level: the layer level

#### Inherited Methods

Inherited From FEDataList

> FEDataList::FEDataList()
> FEDataList::disable_item()
> FEDataList::get_value_text()
> FEDataList::set_list_data()
> FEDataList::validate()

Inherited From FEBoxElement

> FEBoxElement::FEBoxElement()

Inherited From FormElement

> FormElement::FormElement()
> FormElement::build_id_name()
> FormElement::create_element_name()
> FormElement::enable_validation()
> FormElement::form_tag_onsubmit()
> FormElement::get_attribute()
> FormElement::get_confirm_element()
> FormElement::get_element()
> FormElement::get_element_name()
> FormElement::get_errors()
> FormElement::get_error_message()
> FormElement::get_form_element()
> FormElement::get_init_value()
> FormElement::get_label()
> FormElement::get_label_text()
> FormElement::get_required_symbol()
> FormElement::get_slave_elements()
> FormElement::get_tabindex()
> FormElement::get_value()
> FormElement::get_value_text()
> FormElement::has_error()
> FormElement::is_disabled()
> FormElement::is_readonly()
> FormElement::is_required()
> FormElement::javascript()
> FormElement::onBlur()
> FormElement::onChange()
> FormElement::onClick()
> FormElement::onFocus()
> FormElement::onSubmit()
> FormElement::set_attribute()
> FormElement::set_colon_flag()
> FormElement::set_data_all_slaves()
> FormElement::set_disabled()
> FormElement::set_element_name()
> FormElement::set_error_message()
> FormElement::set_form_name()
> FormElement::set_label_text()
> FormElement::set_onBlur()
> FormElement::set_onChange()
> FormElement::set_onClick()
> FormElement::set_onFocus()
> FormElement::set_onSubmit()
> FormElement::set_readonly()
> FormElement::set_required()
> FormElement::set_required_symbol()
> FormElement::set_slave_data()
> FormElement::set_slave_elements()
> FormElement::set_stripslashes()
> FormElement::set_style_attribute()
> FormElement::set_tabindex()
> FormElement::set_title()
> FormElement::set_value()
> FormElement::validate()
> FormElement::_build_element_attributes()
> FormElement::_build_javascript()
> FormElement::_do_validation()
> FormElement::_sanitize_string()

Documentation generated on Thu, 1 Sep 2005 17:05:46 -0700 by phpDocumentor 1.3.0RC3