Docs For Class TabList

## Class TabList

Description

This class implements a set of multiple tabs holding data objects

- author: Suren Markossian
- author: Walter A. Boring IV

Located in /widgets/TabWidget.inc (line 111)

    Container
       |
       --BaseWidget
          |
          --TabList

Variable Summary
mixed $_icons
mixed $_icon_flag
mixed $_save_vars
mixed $_subtab_flag
mixed $_tabs
mixed $_tab_elected
mixed $_tab_line_flag
mixed $_tab_num
mixed $_tab_row
mixed $_ui_wrapper
mixed $_valid_tab
Method Summary
TabList TabList (the $title)
void add (title &$tab_obj, data 1)
void addicon (string $icon, string $title, string $url)
void add_icon (string $icon, string $title, string $url, [string $width = ''], [string $height = ''], [string $onclick = ''])
void get_title ()
string name (string $title)
string queryvar (string $title)
string render (int $indent_level, int $output_debug)
void setTabLine ([mixed $display = false])
void set_save_vars (array $vars)
void _add_line_spacing ()
void _add_tab_spacer ([boolean $last_spacer = false])
void _build_icons ()
string _build_save_vars ()
void _build_subtab (string $title, string $tab_name, mixed $subtab_name)
none _build_subtab_ui ()
void _build_tab (string $title, mixed $tab_name)
none _build_top_tab_ui ()
string _build_url (string $tab_name, [string $subtab_name = null])
Container _invalid_tab ()
void _set_subtab_flag (boolean $flag)
Variables
mixed $_icons = array() (line 165)

array of icons that have been added

mixed $_icon_flag = false (line 170)

boolean to tell whether icons have been added

mixed $_save_vars = array() (line 141)

This holds a list of name=>value vars that the caller/child wants to propogate automatically.

mixed $_subtab_flag = false (line 147)

Flag to let us know we are a subtab

list or not

mixed $_tabs = array() (line 127)

array of tabs that have been added

mixed $_tab_elected = null (line 122)

The selected tab

from the list

mixed $_tab_line_flag = false (line 175)

boolean to tell whether to display line after tab

mixed $_tab_num (line 116)

The number of tabs

mixed $_tab_row = null (line 132)

the TR object for the tabs

mixed $_ui_wrapper = null (line 155)

The outer wrapper for the ui.

So we can build top level and sublevels

mixed $_valid_tab = false (line 160)

valid selected tab?

#### Inherited Variables

Inherited from BaseWidget

> BaseWidget::$title
> BaseWidget::$width
> BaseWidget::$_image_prefix

Methods
Constructor TabList (line 182)

The constructor.

TabList TabList (the $title)

- the $title: title of the tablist.

add (line 219)

This public method adds a new tab to the table

void add (title &$tab_obj, data 1)

- data 1: object - data container for this tab
- title &$tab_obj: string - tab title

Redefinition of:

Container::add()
  add content onto content stack

addicon (line 248)

Alias for add_icon

Note, this method name does not follow the standard method naming convention and has been deprecated

- deprecated:

void addicon (string $icon, string $title, string $url)

- string $icon: icon SRC to display
- string $title: link verbage
- string $url: link URL

add_icon (line 263)

This public method adds a new tab icon to the table

void add_icon (string $icon, string $title, string $url, [string $width = ''], [string $height = ''], [string $onclick = ''])

- string $icon: icon SRC to display
- string $title: link verbage
- string $url: link URL
- string $width: width of icon image
- string $height: height of icon image
- string $onclick: onclick javascript event handler for a tag

get_title (line 276)

Return the title

void get_title ()

Redefinition of:

BaseWidget::get_title()
  Function for accessing the title of this widget

name (line 343)

This method creates the name of the tab

- return: - the tab name

string name (string $title)

- string $title: - the tab display string

queryvar (line 356)

This method builds the query string 'tab_selected=<name>' for you to place in a url

- return: - the query var assigned to tab name

string queryvar (string $title)

- string $title: - the tab title

render (line 193)

The render method

- return: the output html

string render (int $indent_level, int $output_debug)

- int $indent_level: the html indentation level
- int $output_debug: the html debug level

Redefinition of:

Container::render()
  This function is compatible with the rest of the phpHtmllib API spec.

setTabLine (line 210)

Sets display line after tab

void setTabLine ([mixed $display = false])
set_save_vars (line 288)

This function sets the save variables that the user/child wants to automatically propogate

void set_save_vars (array $vars)

- array $vars: - name=>value pairs of the data that they want to propogate

_add_line_spacing (line 627)

This method adds a new spacing between the tabs and the tab contents

void _add_line_spacing ()
_add_tab_spacer (line 555)

This method adds a new spacer in between the tabs.

void _add_tab_spacer ([boolean $last_spacer = false])

- boolean $last_spacer: - is this the last spacer?

_build_icons (line 592)

This method builds the icons to the right of the tabs

void _build_icons ()
_build_save_vars (line 299)

this function builds a partial query string with the $this->_save_vars

string _build_save_vars ()
_build_subtab (line 523)

This method builds a single subtab

void _build_subtab (string $title, string $tab_name, mixed $subtab_name)

- string $title: the title
- string $tab_name: the tab name

_build_subtab_ui (line 431)

This method builds the outer wrapper UI for the subtab

none _build_subtab_ui ()
_build_tab (line 484)

This method is used to build a top level tab

void _build_tab (string $title, mixed $tab_name)

- string $title: - the tab title

_build_top_tab_ui (line 367)

This method builds the outer wrapper UI for the top level tab list.

none _build_top_tab_ui ()
_build_url (line 318)

this private function builds the url for the main tab script and adss the needed query string params

- return: url

string _build_url (string $tab_name, [string $subtab_name = null])

- string $tab_name: - the tab name
- string $subtab_name: - the subtab name

_invalid_tab (line 584)

This method builds a message for an invalid selected tab/subtab

Container _invalid_tab ()
_set_subtab_flag (line 333)

This method is used to set the subtab bit

void _set_subtab_flag (boolean $flag)

- boolean $flag

#### Inherited Methods

Inherited From BaseWidget

> BaseWidget::get_align()
> BaseWidget::get_css()
> BaseWidget::get_javascript()
> BaseWidget::get_title()
> BaseWidget::get_width()
> BaseWidget::set_align()
> BaseWidget::set_image_path_prefix()
> BaseWidget::set_title()
> BaseWidget::set_width()

Inherited From Container

> Container::Container()
> Container::add()
> Container::add_reference()
> Container::count_content()
> Container::get_element()
> Container::get_indent_flag()
> Container::push()
> Container::push_reference()
> Container::render()
> Container::reset_content()
> Container::set_collapse()
> Container::set_indent_flag()

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