XBS_MODGEN
[ class tree: XBS_MODGEN ] [ index: XBS_MODGEN ] [ all elements ]

Class: XBS_MODGENTableForm

Source Location: /class/class.xbs_modgen.form.inc

Class Overview


Create a Table with individual row edit capabilities


Author(s):

Version:

  • 1

Variables

Methods



Class Details

[line 251]
Create a Table with individual row edit capabilities



Tags:

version:  1


[ Top ]


Class Variables

$_cols = array()

[line 257]


Type:   mixed


[ Top ]

$_deleteUrl =  ''

[line 264]


Type:   mixed


[ Top ]

$_dispKey =  1

[line 265]


Type:   mixed


[ Top ]

$_editUrl =  ''

[line 262]


Type:   mixed


[ Top ]

$_hasDelete =  false

[line 263]


Type:   mixed


[ Top ]

$_hasEdit =  false

[line 261]


Type:   mixed


[ Top ]

$_hasInsert =  false

[line 259]


Type:   mixed


[ Top ]

$_insertUrl =  ''

[line 260]


Type:   mixed


[ Top ]

$_rows = array()

[line 258]


Type:   mixed


[ Top ]



Class Methods


constructor XBS_MODGENTableForm [line 282]

XBS_MODGENTableForm XBS_MODGENTableForm( array $colNames, [string $title = null], [boolean $dispKey = true], [string $newUrl = null], [string $editUrl = null], [string $delUrl = null])

Constructor

For the three url parameters you should supply something like http:/myserver.com/modules/mymod/admin/tableprocess.php?op=edit&id= i.e they are absolute urls. Note trailing =. The value of column 0 (KeyId) will be suffixed to the url string before processing




Parameters:

array   $colNames   names of columns [0 => rowKeyName, 1 => Col1name .. n => Colnname]
string   $title   title of table if required
boolean   $dispKey   display the row key as first column. If false, you must still supply a column name as the first column in $colNames but it will be ignored and can safely be set to null or ''
string   $newUrl   url to redirect to add a new record
string   $editUrl   url to redirect to edit a record
string   $delUrl   url to redirect to delete a record

[ Top ]

method addRow [line 302]

void addRow( array $row)

Add a row of data to the table



Parameters:

array   $row   one row of data to display [0 => KeyId, 1 => Col1Data 2, n => ColnData]

[ Top ]

method display [line 323]

mixed display( [boolean $render = true])

output the table as html



Tags:

return:  string if $render = false, else void


Parameters:

boolean   $render   If true then echo html to output else return html to caller

[ Top ]


Documentation generated on Sun, 16 Jul 2006 11:02:46 +0100 by phpDocumentor 1.3.0RC3