class JHtmlGrid


Located at : UKNOWVA_ROOT/libraries/joomla/html/html/grid.php

Utility class for creating HTML Grids

Methods

static string
boolean(integer $i, integer $value, string $taskOn = null, string $taskOff = null)

Display a boolean setting widget.

static string
sort(string $title, string $order, string $direction = 'asc', string $selected, string $task = NULL, string $new_direction = 'asc')

Method to sort a column in a grid

static mixed
id(integer $rowNum, integer $recId, boolean $checkedOut = false, string $name = 'cid')

Method to create a checkbox for a grid row.

static string
access(integer $row, integer $i, boolean $archived = NULL) deprecated

Deprecated method to change access level in a grid

static 
checkedOut($row, $i, $identifier = 'id')

No description

static string
published(mixed $value, integer $i, string $img1 = 'tick.png', string $img0 = 'publish_x.png', string $prefix = '')

Method to create a clickable icon to change the state of an item

static string
state(string $filter_state = '*', string $published = 'Published', string $unpublished = 'Unpublished', string $archived = null, string $trashed = null)

Method to create a select list of states for filtering By default the filter shows only published and unpublishe items

static string
order(array $rows, string $image = 'filesave.png', string $task = 'saveorder')

Method to create an icon for saving a new ordering in a grid

static 
behavior()

Method to build the behavior script and add it to the document head.

Details

at line 33
static string boolean(integer $i, integer $value, string $taskOn = null, string $taskOff = null)

Display a boolean setting widget.

Parameters

integer $i The row index.
integer $value The value of the boolean field.
string $taskOn Task to turn the boolean setting on.
string $taskOff Task to turn the boolean setting off.

Return Value

string The boolean setting widget.

at line 71
static string sort(string $title, string $order, string $direction = 'asc', string $selected, string $task = NULL, string $new_direction = 'asc')

Method to sort a column in a grid

Parameters

string $title The link title
string $order The order field for the column
string $direction The current direction
string $selected The selected ordering
string $task An optional task override
string $new_direction An optional direction for the new column

Return Value

string

at line 105
static mixed id(integer $rowNum, integer $recId, boolean $checkedOut = false, string $name = 'cid')

Method to create a checkbox for a grid row.

Parameters

integer $rowNum The row index
integer $recId The record id
boolean $checkedOut True if item is checke out
string $name The name of the form element

Return Value

mixed String of html with a checkbox if item is not checked out, null if checked out.

at line 129
static string access(integer $row, integer $i, boolean $archived = NULL) deprecated

deprecated 12.1

Deprecated method to change access level in a grid

Parameters

integer $row Row id
integer $i Row index
boolean $archived True if the item is archived

Return Value

string

at line 158
static checkedOut($row, $i, $identifier = 'id')

Parameters

$row
$i
$identifier

at line 200
static string published(mixed $value, integer $i, string $img1 = 'tick.png', string $img0 = 'publish_x.png', string $prefix = '')

Method to create a clickable icon to change the state of an item

Parameters

mixed $value Either the scalar value or an object (for backward compatibility, deprecated)
integer $i The index
string $img1 Image for a positive or on value
string $img0 Image for the empty or off value
string $prefix An optional prefix for the task

Return Value

string

at line 232
static string state(string $filter_state = '*', string $published = 'Published', string $unpublished = 'Unpublished', string $archived = null, string $trashed = null)

Method to create a select list of states for filtering By default the filter shows only published and unpublishe items

Parameters

string $filter_state The initial filter state
string $published The JText string for published
string $unpublished The JText string for Unpublished
string $archived The JText string for Archived
string $trashed The JText string for Trashed

Return Value

string

at line 275
static string order(array $rows, string $image = 'filesave.png', string $task = 'saveorder')

Method to create an icon for saving a new ordering in a grid

Parameters

array $rows The array of rows of rows
string $image The image
string $task The task to use, defaults to save order

Return Value

string

at line 315
static behavior()

Method to build the behavior script and add it to the document head.