tina_mvc/helpers/tina_mvc_table_helper_class.php
Builds a html table from your data
- Package
- Tina-MVC
- Subpackage
- Core
\TINA_MVC\table
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
$data
Direct acces is not supported.
- Type
- n/a
$do_not_esc_td
Direct acces is not supported.
- Type
- n/a
$do_not_esc_th
Direct acces is not supported.
- Type
- n/a
$html
Direct acces is not supported.
- Type
- n/a
Methods
__construct(string $tablename = false) : void
Constructor
Sets up the table
Name | Type | Description |
---|---|---|
$tablename | string | unique name for the table e.g. 'users-list' |
do_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.
Name | Type | Description |
---|---|---|
$tf | boolean |
Type | Description |
---|---|
object | table helper |
do_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.
Name | Type | Description |
---|---|---|
$tf | boolean |
Type | Description |
---|---|
object | table helper |
get_html() : string
Builds the table and returns HTML ready to echo to the browser
Type | Description |
---|---|
string | The HTML table |
set_data(mixed $data = array()) : object
Set the data you wish to display
Name | Type | Description |
---|---|---|
$data | mixed | An array or object of data you want to display |
Type | Description |
---|---|
object | table helper |
set_id(string $id = FALSE) : object
Sets the id for the table
Name | Type | Description |
---|---|---|
$id | string | he CSS id for the table |
Type | Description |
---|---|
object | table helper |