public
|
#
__construct( array $options = array() )
Constructor for a JGrid object
Constructor for a JGrid object
Parameters
- $options
array - $options Associative array of attributes for the table-tag
Since
11.3
|
public
string
|
#
__toString( )
Magic function to render this object as a table.
Magic function to render this object as a table.
Returns
string
Since
11.3
|
public
JGrid
|
#
setTableOptions( array $options = array(), boolean $replace = false )
Method to set the attributes for a table-tag
Method to set the attributes for a table-tag
Parameters
- $options
array - $options Associative array of attributes for the table-tag
- $replace
boolean - $replace Replace possibly existing attributes
Returns
JGrid
- This object for chaining
Since
11.3
|
public
array
|
#
getTableOptions( )
Get the Attributes of the current table
Get the Attributes of the current table
Returns
array - Associative array of attributes
Since
11.3
|
public
JGrid
|
#
addColumn( string $name )
Add new column name to process
Add new column name to process
Parameters
- $name
string - $name Internal column name
Returns
JGrid
- This object for chaining
Since
11.3
|
public
array
|
#
getColumns( )
Returns the list of internal columns
Returns the list of internal columns
Returns
array - List of internal columns
Since
11.3
|
public
JGrid
|
#
deleteColumn( string $name )
Delete column by name
Parameters
- $name
string - $name Name of the column to be deleted
Returns
JGrid
- This object for chaining
Since
11.3
|
public
JGrid
|
#
setColumns( array $columns )
Method to set a whole range of columns at once This can be used to re-order
the columns, too
Method to set a whole range of columns at once This can be used to re-order
the columns, too
Parameters
- $columns
array - $columns List of internal column names
Returns
JGrid
- This object for chaining
Since
11.3
|
public
JGrid
|
#
addRow( array $options = array(), integer $special = false )
Adds a row to the table and sets the currently active row to the new row
Adds a row to the table and sets the currently active row to the new row
Parameters
- $options
array - $options Associative array of attributes for the row
- $special
integer - $special 1 for a new row in the header, 2 for a new row in the footer
Returns
JGrid
- This object for chaining
Since
11.3
|
public
array
|
#
getRowOptions( )
Method to get the attributes of the currently active row
Method to get the attributes of the currently active row
Returns
array - Associative array of attributes
Since
11.3
|
public
JGrid
|
#
setRowOptions( array $options )
Method to set the attributes of the currently active row
Method to set the attributes of the currently active row
Parameters
- $options
array - $options Associative array of attributes
Returns
JGrid
- This object for chaining
Since
11.3
|
public
integer
|
#
getActiveRow( )
Get the currently active row ID
Get the currently active row ID
Returns
integer - ID of the currently active row
Since
11.3
|
public
JGrid
|
#
setActiveRow( integer $id )
Set the currently active row
Set the currently active row
Parameters
- $id
integer - $id ID of the row to be set to current
Returns
JGrid
- This object for chaining
Since
11.3
|
public
JGrid
|
#
setRowCell( string $name, string $content, array $option = array(), boolean $replace = true )
Set cell content for a specific column for the currently active row
Set cell content for a specific column for the currently active row
Parameters
- $name
string - $name Name of the column
- $content
string - $content Content for the cell
- $option
array - $option Associative array of attributes for the td-element
- $replace
boolean - $replace If false, the content is appended to the current content of the cell
Returns
JGrid
- This object for chaining
Since
11.3
|
public
array
|
#
getRow( integer $id = false )
Get all data for a row
Parameters
- $id
integer - $id ID of the row to return
Returns
array - Array of columns of a table row
Since
11.3
|
public
array
|
#
getRows( integer $special = false )
Get the IDs of all rows in the table
Get the IDs of all rows in the table
Parameters
- $special
integer - $special false for the standard rows, 1 for the header rows, 2 for the footer
rows
Returns
array - Array of IDs
Since
11.3
|
public
JGrid
|
#
deleteRow( integer $id )
Delete a row from the object
Delete a row from the object
Parameters
- $id
integer - $id ID of the row to be deleted
Returns
JGrid
- This object for chaining
Since
11.3
|
public
string
|
#
toString( )
Render the HTML table
Returns
string - The rendered HTML table
Since
11.3
|
protected
string
|
#
renderArea( array $ids, string $area = 'tbody', string $cell = 'td' )
Render an area of the table
Render an area of the table
Parameters
- $ids
array - $ids IDs of the rows to render
- $area
string - $area Name of the area to render. Valid: tbody, tfoot, thead
- $cell
string - $cell Name of the cell to render. Valid: td, th
Returns
string - The rendered table area
Since
11.3
|
protected
string
|
#
renderAttributes( array $attributes )
Renders an HTML attribute from an associative array
Renders an HTML attribute from an associative array
Parameters
- $attributes
array - $attributes Associative array of attributes
Returns
string - The HTML attribute string
Since
11.3
|