JHtmlGrid
Utility class for creating HTML Grids
package |
Joomla.Platform |
---|---|
subpackage |
HTML |
since |
11.1 |
Methods
_checkedOut
Method to create a checked out icon with optional overlib in a grid.
_checkedOut( &$row, boolean $overlib = 1) : string
since |
11.1 |
---|
Arguments
- $row
- $overlib
boolean
True if an overlib with checkout information should be created.
Response
string
HTMl for the icon and overlib
access
Deprecated method to change access level in a grid
access( &$row, integer $i, boolean $archived = null) : string
deprecated |
12.1 |
---|---|
note |
This method is incompatible with JAccess |
since |
11.1 |
Arguments
- $row
- $i
integer
Row index- $archived
boolean
True if the item is archived
Response
string
behavior
Method to build the behavior script and add it to the document head.
behavior() : void
since |
11.1 |
---|
boolean
Display a boolean setting widget.
boolean(integer $i, integer $value, string $taskOn = null, string $taskOff = null) : string
since |
11.1 |
---|
Arguments
- $i
integer
The row index.- $value
integer
The value of the boolean field.- $taskOn
string
Task to turn the boolean setting on.- $taskOff
string
Task to turn the boolean setting off.
Response
string
The boolean setting widget.
checkedOut
Displays a checked out icon.
checkedOut( &$row, integer $i, string $identifier = 'id') : string
since |
11.1 |
---|
Arguments
- $row
- $i
integer
The index of the row.- $identifier
string
The property name of the primary key or index of the row.
Response
string
id
Method to create a checkbox for a grid row.
id(integer $rowNum, integer $recId, boolean $checkedOut = false, string $name = 'cid') : mixed
Arguments
- $rowNum
integer
The row index- $recId
integer
The record id- $checkedOut
boolean
True if item is checke out- $name
string
The name of the form element
Response
mixed
String of html with a checkbox if item is not checked out, null if checked out.
order
Method to create an icon for saving a new ordering in a grid
order(array $rows, string $image = 'filesave.png', string $task = 'saveorder') : string
since |
11.1 |
---|
Arguments
- $rows
array
The array of rows of rows- $image
string
The image- $task
string
The task to use, defaults to save order
Response
string
published
Method to create a clickable icon to change the state of an item
published(mixed $value, integer $i, string $img1 = 'tick.png', string $img0 = 'publish_x.png', string $prefix = '') : string
since |
11.1 |
---|
Arguments
- $value
mixed
Either the scalar value or an object (for backward compatibility, deprecated)- $i
integer
The index- $img1
string
Image for a positive or on value- $img0
string
Image for the empty or off value- $prefix
string
An optional prefix for the task
Response
string
sort
Method to sort a column in a grid
sort(string $title, string $order, string $direction = 'asc', string $selected, string $task = null, string $new_direction = 'asc') : string
since |
11.1 |
---|
Arguments
- $title
string
The link title- $order
string
The order field for the column- $direction
string
The current direction- $selected
string
The selected ordering- $task
string
An optional task override- $new_direction
string
An optional direction for the new column
Response
string
state
Method to create a select list of states for filtering By default the filter shows only published and unpublished items
state(string $filter_state = '*', string $published = 'Published', string $unpublished = 'Unpublished', string $archived = null, string $trashed = null) : string
since |
11.1 |
---|
Arguments
- $filter_state
string
The initial filter state- $published
string
The JText string for published- $unpublished
string
The JText string for Unpublished- $archived
string
The JText string for Archived- $trashed
string
The JText string for Trashed
Response
string