![]() |
Xataface
2.0alpha2
Xataface Application Framework
|
Public Member Functions | |
| Dataface_TreeTable (&$record, $relationship=null) | |
| & | getRecordByRowId ($rowid) |
| & | getSubrows (&$rows, $rowid, &$record, $depth=3) |
| getSubrowsAsHTML ($rowid, $depth=3, $treetableid='treetable') | |
| toHtml ($depth=3, $treetableid='treetable') | |
Data Fields | |
| $record | |
| $relationship | |
A tree table for displaying records in a heirarchical view.
Definition at line 9 of file TreeTable.php.
| Dataface_TreeTable | ( | & | $record, |
$relationship = null |
|||
| ) |
Constructor.
| Dataface_Record | $record | The root record. |
| string | $relationship | The name of the relationship. |
Definition at line 28 of file TreeTable.php.
| & getRecordByRowId | ( | $rowid | ) |
Returns the Dataface_Record object that belongs at the given row id.
| string | $rowid | A hyphenated string that uniquely identifies a row of the tree table. e.g. 1-3-2 identifies the 2nd subrow of the 3rd subrow of the 1st row. |
Definition at line 40 of file TreeTable.php.
| & getSubrows | ( | & | $rows, |
| $rowid, | |||
| & | $record, | ||
$depth = 3 |
|||
| ) |
Returns the subrows of the given row as an array with keys being the rowid and values being Dataface_Record objects.
| string | $rowid | The row id of the root row. This will be a string such as '1-2-4'. In this example the root would be the 4th subrow of the 2nd subrow of the first row of the tree-table. |
| integer | $depth | How deep down the tree heirarchy do we want to go. |
Definition at line 86 of file TreeTable.php.
| getSubrowsAsHTML | ( | $rowid, | |
$depth = 3, |
|||
$treetableid = 'treetable' |
|||
| ) |
Returns the subrows rooted at $rowid (not including $rowid's row) as html <tr> tags.
| string | $rowid | The id of the row whose subrowse we wish to retrieve. |
| integer | $depth | How far down the tree do we want to go. |
Definition at line 132 of file TreeTable.php.
| toHtml | ( | $depth = 3, |
|
$treetableid = 'treetable' |
|||
| ) |
Renders the entire treetable as HTML.
Definition at line 217 of file TreeTable.php.
| $record |
Definition at line 14 of file TreeTable.php.
| $relationship |
Definition at line 20 of file TreeTable.php.
1.8.1.2