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
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 = 0], [int $output_debug = 0])
void setTabLine ([ $display = false])
void set_save_vars (array $vars)
void _add_tab_spacer ([boolean $last_spacer = false])
void _build_icons ()
string _build_save_vars ()
void _build_subtab (string $title, string $tab_name,  $subtab_name)
void _build_tab (string $title,  $tab_name)
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_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 $_tab_selected = null (line 122)

The selected tab

from the list

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 253)

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 268)

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 281)

Return the title

void get_title ()

Redefinition of:
BaseWidget::get_title()
Function for accessing the title of this widget
name (line 348)

This method creates the name of the tab

  • return: - the tab name
string name (string $title)
  • string $title: - the tab display string
queryvar (line 361)

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 = 0], [int $output_debug = 0])
  • 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 ([ $display = false])
  • $display
set_save_vars (line 293)

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 642)

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

void _add_line_spacing ()
_add_tab_spacer (line 570)

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 607)

This method builds the icons to the right of the tabs

void _build_icons ()
_build_save_vars (line 304)

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

string _build_save_vars ()
_build_subtab (line 538)

This method builds a single subtab

void _build_subtab (string $title, string $tab_name,  $subtab_name)
  • string $title: the title
  • string $tab_name: the tab name
  • $subtab_name
_build_subtab_ui (line 441)

This method builds the outer wrapper UI for the subtab

none _build_subtab_ui ()
_build_tab (line 499)

This method is used to build a top level tab

void _build_tab (string $title,  $tab_name)
  • string $title: - the tab title
  • $tab_name
_build_top_tab_ui (line 372)

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

none _build_top_tab_ui ()
_build_url (line 323)

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 599)

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

Container _invalid_tab ()
_set_subtab_flag (line 338)

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 Fri, 28 Jan 2011 08:53:24 -0500 by phpDocumentor 1.4.3