Grid
class Grid (View source)
The Grid class to dynamically generate HTML tables.
This is currently a Joomla JGrid fork.
Constants
ROW_HEAD |
|
ROW_FOOT |
|
ROW_NORMAL |
|
Methods
Constructor for a Grid object
Magic function to render this object as a table.
Method to set the attributes for a table-tag
Get the Attributes of the current table
Returns the list of internal columns
Delete column by name
Method to set a whole range of columns at once This can be used to re-order the columns, too
Adds a row to the table and sets the currently active row to the new row
Method to get the attributes of the currently active row
Method to set the attributes of the currently active row
Get the currently active row ID
Set the currently active row
Set cell content for a specific column for the currently active row
Get all data for a row
Get the IDs of all rows in the table
Render the HTML table
Details
at line line 63
__construct(array $attribs = array())
Constructor for a Grid object
at line line 87
string
__toString()
Magic function to render this object as a table.
at line line 109
Grid
setTableAttributes(array $attribs = array(), bool $replace = false)
Method to set the attributes for a table-tag
at line line 130
array
getTableAttributes()
Get the Attributes of the current table
at line line 158
array
getColumns()
Returns the list of internal columns
at line line 195
Grid
setColumns(array $columns)
Method to set a whole range of columns at once This can be used to re-order the columns, too
at line line 213
Grid
addRow(array $attribs = array(), int|bool $special = self::ROW_NORMAL)
Adds a row to the table and sets the currently active row to the new row
at line line 240
array
getRowAttributes()
Method to get the attributes of the currently active row
at line line 254
Grid
setRowAttributes(array $attribs)
Method to set the attributes of the currently active row
at line line 268
int
getActiveRow()
Get the currently active row ID
at line line 302
Grid
setRowCell(string $name, string $content, array $attribs = array(), bool $replace = true)
Set cell content for a specific column for the currently active row
at line line 329
array
getRow(int|bool $id = false)
Get all data for a row
at line line 355
array
getRows(int|bool $special = false)
Get the IDs of all rows in the table
at line line 411
string
toString()
Render the HTML table