tina_mvc/helpers/tina_mvc_table_helper_class.php

Show: PublicProtectedPrivateinherited
Table of Contents
Table Helper class file

Builds a html table from your data

Package
Tina-MVC  
Subpackage
Core  

\TINA_MVC\table

Package: Tina-MVC\Core
Table Helper class file

Builds a HTML table of results from data

Column headings are taken from the array keys or object properties

$tablename
string

a unique name for the form

Properties

>VPropertyprivate$data
Class variables should only be accessed using setters and getters.

Direct acces is not supported.

Details
Type
n/a
>VPropertyprivate$do_not_esc_td
Class variables should only be accessed using setters and getters.

Direct acces is not supported.

Details
Type
n/a
>VPropertyprivate$do_not_esc_th
Class variables should only be accessed using setters and getters.

Direct acces is not supported.

Details
Type
n/a
>VPropertyprivate$html
Class variables should only be accessed using setters and getters.

Direct acces is not supported.

Details
Type
n/a
>VPropertyprivate$tablename
Class variables should only be accessed using setters and getters.

Direct acces is not supported.

Details
Type
n/a

Methods

methodpublic__construct(string $tablename = false) : void

Constructor

Sets up the table

Parameters
NameTypeDescription
$tablenamestring

unique name for the table e.g. 'users-list'

methodpublicdo_not_esc_td(boolean $tf = FALSE) : object

Prevent escaping of the table cells

These are taken from the array keys or object properties of the data you have entered. You might want to pass HTML in which case you do not want the text escaped.

Parameters
NameTypeDescription
$tfboolean
Returns
TypeDescription
objecttable helper
methodpublicdo_not_esc_th(boolean $tf = FALSE) : object

Prevent escaping of the table headings

These are taken from the array keys or object properties of the data you have entered. You might want to pass HTML in which case you do not want the text escaped.

Parameters
NameTypeDescription
$tfboolean
Returns
TypeDescription
objecttable helper
methodpublicget_html() : string

Builds the table and returns HTML ready to echo to the browser

Returns
TypeDescription
stringThe HTML table
methodpublicget_id() : string

Getter

Returns
TypeDescription
string
methodpublicget_name() : string

Getter

Returns
TypeDescription
string
methodpublicset_data(mixed $data = array()) : object

Set the data you wish to display

Parameters
NameTypeDescription
$datamixed

An array or object of data you want to display

Returns
TypeDescription
objecttable helper
methodpublicset_id(string $id = FALSE) : object

Sets the id for the table

Parameters
NameTypeDescription
$idstring

he CSS id for the table

Returns
TypeDescription
objecttable helper
methodpublicset_name(string $name = '') : object

Sets the name (after sanitising)

Parameters
NameTypeDescription
$namestring
Returns
TypeDescription
objecttable helper
Documentation was generated by phpDocumentor 2.0.0a12.