## Class mr_html_table_column

Description

MR HTML Table Column

- author: Mark Nielsen

Located in /html/table/column.php (line 37)

Direct descendents

Class | Description
--- | ---
mr_html_table_column_dynamic | Model Table Column Dynamic

Variable Summary
mr_var $config
array $formats
Method Summary
mr_html_table_column __construct (string $field, [string $heading = ''], [array $config = array()])
mr_html_table_column add_format (mixed $format)
void add_heading ( &$headings, array $headings)
mixed get_cell (array $row)
mr_var get_config ()
string get_name ()
mixed get_select_field ()
array get_sorting ()
boolean has_heading ()
mr_html_table_column set_config (string $name, mixed $value)
Variables
mr_var $config (line 43)

Column settings/configurations

- access: protected

array $formats = array() (line 50)

Column formatting

- access: protected

Methods
Constructor __construct (line 62)

Column definition

- access: public

mr_html_table_column __construct (string $field, [string $heading = ''], [array $config = array()])

- string $field: The SQL field that the column represents. This param can take several forms. Example: tablealias.fieldname OR someothername AS fieldname If preferred, you can set the field via config and pass the resulting fieldname here.
- string $heading: Column heading
- array $config: Override default configs

add_format (line 186)

Add a column format

- throws: coding_exception
- access: public

mr_html_table_column add_format (mixed $format)

- mixed $format: This can be mr_format_abstract or a string representing the format's name. If a string, then keep passing args which will be passed to the format's constructor

Redefined in descendants as:

- mr_html_table_column_dynamic::add_format() : Add format to all columns

add_heading (line 140)

Add column heading to passed param

- access: public

void add_heading ( &$headings, array $headings)

- array $headings: List of headings
- &$headings

Redefined in descendants as:

- mr_html_table_column_dynamic::add_heading() : Add headings of all dynamic columns

get_cell (line 210)

Derive cell value from row

- throws: coding_exception
- access: public

mixed get_cell (array $row)

- array $row: Generally database record object

get_config (line 173)

Get config object

- access: public

mr_var get_config ()
get_name (line 105)

Get the column name

- access: public

string get_name ()
get_select_field (line 114)

Get the select field for the SQL query

- access: public

mixed get_select_field ()

Redefined in descendants as:

- mr_html_table_column_dynamic::get_select_field() : Get select fields of all dynamic columns

get_sorting (line 126)

Return sorting rules for this column

- access: public

array get_sorting ()
has_heading (line 149)

Does this column have a heading

- access: public

boolean has_heading ()

Redefined in descendants as:

- mr_html_table_column_dynamic::has_heading() : Check all columns for headings

set_config (line 163)

A config setter - overwrites old value

- access: public

mr_html_table_column set_config (string $name, mixed $value)

- string $name: Name of the config to set
- mixed $value: The value of the config

Redefined in descendants as:

- mr_html_table_column_dynamic::set_config() : Set config to all columns

Documentation generated on Thu, 28 Jun 2012 16:33:47 -0700 by phpDocumentor 1.4.3