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 /widgets/InfoTable.inc (line 23)

Container
   |
   --BaseWidget
      |
      --InfoTable
Variable Summary
Method Summary
InfoTable InfoTable (string $title, [string $width = "100%"], [string $align = NULL])
void add_column_header (string $title, string $width, [ $align = "center"])
void add_row (mixed 0)
string render ([int $indent_level = 1], [int $output_debug = 0])
void set_alt_color_flag ([boolean $flag = true])
void set_cellpadding ([int $pad = 0])
void set_cellspacing ([int $spacing = 0])
void set_column_header (int $header, string $title, string $width, [ $align = "center"])
none set_show_cellborders ([boolean $flag = true])
void set_title_css (string $class)
void set_title_text_align ([string $align = "left"])
void set_vertical_cellborder ([boolean $flag = TRUE])
array/none use_alt_colors (int $row)
TDtag _build_td ([int $width = ""], [string $align = ""], int $col_num, int $total_cols)
Variables
mixed $_alt_color_flag = FALSE (line 68)

Toggles whether to show alternate color

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_cellborders = TRUE (line 63)

Show any internal borders?

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
BaseWidget::$_image_prefix
Methods
Constructor InfoTable (line 77)

The constructor

InfoTable 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 143)

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

void add_column_header (string $title, string $width, [ $align = "center"])
  • string $title: - the title for the column
  • string $width: - the alignment of the title
  • $align
add_row (line 168)

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

This gets the current value of the cellpadding

  • return: - the current cellpadding
int get_cellpadding ()
get_cellspacing (line 214)

This gets the current value of the cellspacing

  • return: - the current cellspacing
int get_cellspacing ()
get_title_text_align (line 234)

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

this function lets gets the default css class for the title

  • return: - the css class to use
string get_vertical_cellborder ()
render (line 93)

This function renders the object.

  • return: the raw html output.
string render ([int $indent_level = 1], [int $output_debug = 0])
  • 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_alt_color_flag (line 288)

This function sets the alternate_color flag

void set_alt_color_flag ([boolean $flag = true])
  • boolean $flag
set_cellpadding (line 184)

This sets the cellpadding attribute for this object.

void set_cellpadding ([int $pad = 0])
  • int $pad: - the cellpadding value
set_cellspacing (line 204)

This sets the cellspacing attribute for this object.

void set_cellspacing ([int $spacing = 0])
  • int $spacing: - the cellspacing value
set_column_header (line 157)

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

void set_column_header (int $header, string $title, string $width, [ $align = "center"])
  • int $header: - the position of the header
  • string $title: - the title for the column
  • string $width: - the alignment of the title
  • $align
set_show_cellborders (line 267)

This method is used to set the flag to allow showing of the internal borders or not.

none set_show_cellborders ([boolean $flag = true])
  • boolean $flag
set_title_css (line 297)

This function sets css class of the title

void set_title_css (string $class)
  • string $class: - the css class to use
set_title_text_align (line 224)

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

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
use_alt_colors (line 278)

This function allows the user to alternate colors on different rows

  • return: Either returns array with attribute or nothing
array/none use_alt_colors (int $row)
  • int $row: current row number
_build_header (line 325)

This function builds the table header

  • return: object
TRtag _build_header ()
_build_td (line 361)

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

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_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:09 -0500 by phpDocumentor 1.4.3