\JGrid
JGrid class to dynamically generate HTML tables
Synopsis
class JGrid
{
- // members
- protected $columns;
- protected $activeRow;
- protected $rows;
- protected $specialRows;
- protected $options;
- // methods
- public void __construct()
- public string __toString()
- public JGrid setTableOptions()
- public array getTableOptions()
- public JGrid addColumn()
- public array getColumns()
- public JGrid deleteColumn()
- public JGrid setColumns()
- public JGrid addRow()
- public array getRowOptions()
- public JGrid setRowOptions()
- public int getActiveRow()
- public JGrid setActiveRow()
- public JGrid setRowCell()
- public array getRow()
- public array getRows()
- public JGrid deleteRow()
- public string toString()
- protected string renderArea()
- protected string renderAttributes()
Hierarchy
Extended by
Members
protected
- $activeRow
—
int
Current active row - $columns
—
array
Array of columns - $options
—
array
Associative array of attributes for the table-tag - $rows
—
array
Rows of the table (including header and footer rows) - $specialRows
—
array
Header and Footer row-IDs
Methods
protected
- renderArea() — Render an area of the table
- renderAttributes() — Renders an HTML attribute from an associative array
public
- __construct() — Constructor for a JGrid object
- __toString() — Magic function to render this object as a table.
- addColumn() — Add new column name to process
- addRow() — Adds a row to the table and sets the currently active row to the new row
- deleteColumn() — Delete column by name
- deleteRow() — Delete a row from the object
- getActiveRow() — Get the currently active row ID
- getColumns() — Returns the list of internal columns
- getRow() — Get all data for a row
- getRowOptions() — Method to get the attributes of the currently active row
- getRows() — Get the IDs of all rows in the table
- getTableOptions() — Get the Attributes of the current table
- setActiveRow() — Set the currently active row
- setColumns() — Method to set a whole range of columns at once This can be used to re-order the columns, too
- setRowCell() — Set cell content for a specific column for the currently active row
- setRowOptions() — Method to set the attributes of the currently active row
- setTableOptions() — Method to set the attributes for a table-tag
- toString() — Render the HTML table