Base table class

Displays a table of rows.

Settings : - displayNumRows : displays number of rows in a table (default : false) - minRowsDisplayLinks : minimum rows before displaying number of rows on top of the table. (default = 10)

category Table
package Formaid
author Dieter Adriaenssens
copyright 2006-2013 Dieter Adriaenssens
license GPL
link http://formaid.sourceforge.net/

 Methods

Constructor, initialises an instance of Formaid_Table

__construct(string $table_name, string $file_name, string $order_by, string $database) : void

Parameters

$table_name

string

Table name

$file_name

string

File name of page containing the table

$order_by

string

SQL column name to order by

$database

string

Database to use

Displays a HTML table.

display() : void

Returns a HTML string of a table.

getDisplayString() : string

Returns

string

Returns string with links to create new items.

getNewItemLinksString() : string

Returns

stringlinks to create new items

Returns number of items string.

getNumItemsString() : string

Returns

stringwith number of items

Add the result of an SQL query as values to the table

importSqlValues(object $sql_result) : void

Parameters

$sql_result

object

return object of a sql request

Displays a HTML table.

show() : void
deprecated use display()

Checks if adding a new item is allowed.

allowAdd() : bool

If the Privileges on this table (allow_add) is set, it is allowed to add a new item.

Returns

booltrue if adding is allowed.

Checks if displaying the table is allowed.

allowShow() : bool

If the Privileges on this table (allow_show) is set, it is allowed to display the table.

Returns

booltrue if displaying is allowed.

Executes an SQL query retrieving data from a table that will be displayed in the HTML table.

_getSelectQueryResult() : object

Returns

objectSQL query result

 Properties

 

$filename : string
access public
 

$header : object
access public
 

$items : object
access public
 

$privileges : array
access public
 

$rows : object
access public
 

$settings : array

Array with property objects

access public
 

$sql_order_by : string
access public
 

$sql_table : string
access public
 

$title : string
access public
 

$db_connection : object
access protected
 

$encoding : string
access protected