Class InfoTable

Description

This is a widget class that can build and render data in a nicely formated table with a title, column headers and data

  • author:

    Walter A. Boring IV

Located in Program_Root/widgets/InfoTable.inc (line 23)

Container
   |
   --BaseWidget
      |
      --InfoTable
Variable Summary
Method Summary
void InfoTable (string $title, [string $width = "100%"], [string $align = NULL])
void add_column_header (string $title, string $width, [mixed $align = "center"])
void add_row (mixed 0)
string render ([int $indent_level = 1], int $output_debug)
void set_cellpadding (int $pad)
void set_cellspacing (int $spacing)
void set_title_text_align ([string $align = "left"])
void set_vertical_cellborder ([boolean $flag = TRUE])
TDtag _build_td ([int $width = ""], [string $align = ""], int $col_num, int $total_cols)
Variables
mixed $_cellpadding = 2 (line 34)

this holds the default cellpadding

mixed $_cellspacing (line 39)

This holds the default cellspacing

mixed $_headers = array() (line 29)

this holds the column header titles.

mixed $_show_vertical_cellborder = TRUE (line 57)

Flag to tell the class to render

the vertical cell border

mixed $_title_css_class = "title" (line 45)

The default class used for the

title

mixed $_title_text_align = "left" (line 51)

The default alignment for the title text in the caption.

Inherited Variables

Inherited from BaseWidget

BaseWidget::$title
BaseWidget::$width

Inherited from Container

Container::$_flags
Methods
Constructor InfoTable (line 68)

The constructor

void InfoTable (string $title, [string $width = "100%"], [string $align = NULL])
  • string $title:

    - the title

  • string $width:

    - the width of the table

  • string $align:

    - the alignment

add_column_header (line 131)

This function is used to set the column header text for each column

void add_column_header (string $title, string $width, [mixed $align = "center"])
  • string $title:

    - the title for the column

  • string $width:

    - the alignment of the title

add_row (line 142)

This function is used to add a row to the table

void add_row (mixed 0)
  • mixed 0:

    - n number of items to push

get_cellpadding (line 168)

This gets the current value of the cellpadding

  • return:

    - the current cellpadding

int get_cellpadding ()
get_cellspacing (line 188)

This gets the current value of the cellspacing

  • return:

    - the current cellspacing

int get_cellspacing ()
get_title_text_align (line 208)

this function lets gets the default css class for the title

  • return:

    - the css class to use

string get_title_text_align ()
get_vertical_cellborder (line 229)

this function lets gets the default css class for the title

  • return:

    - the css class to use

string get_vertical_cellborder ()
render (line 84)

This function renders the object.

  • return:

    the raw html output.

string render ([int $indent_level = 1], int $output_debug)
  • int $indent_level:

    - the indentation level for the container.

  • int $output_debug:

    - the output debug flag to maintain compatibility w/ the API.


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

This sets the cellpadding attribute for this object.

void set_cellpadding (int $pad)
  • int $pad:

    - the cellpadding value

set_cellspacing (line 178)

This sets the cellspacing attribute for this object.

void set_cellspacing (int $spacing)
  • int $spacing:

    - the cellspacing value

set_title_text_align (line 198)

this function lets you change the text alignment of the text in the title

void set_title_text_align ([string $align = "left"])
  • string $align:

    - the alignment.

set_vertical_cellborder (line 219)

this function sets the flag to tell the object to render (or not) the vertical cell borders

void set_vertical_cellborder ([boolean $flag = TRUE])
  • boolean $flag
_build_header (line 258)

This function builds the table header

  • return:

    object

TRtag _build_header ()
_build_td (line 292)

this function builds a TD tag with the border styles set appropriatly

  • return:

    object.

TDtag _build_td ([int $width = ""], [string $align = ""], int $col_num, int $total_cols)
  • int $width:

    - the width

  • string $align:

    - the alignment

  • int $col_num:

    - the current col #

  • int $total_cols:

    - the max cols

_build_title (line 246)

This function builds the title container

  • return:

    object

CAPTIONtag _build_title ()

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_title()
BaseWidget::set_width()

Inherited From Container

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

Documention generated on Thu, 31 Jul 2003 18:32:52 -0700 by phpDocumentor 1.2.0