JHtmlGrid

Utility class for creating HTML Grids

abstract
since

1.5

package

Joomla.Libraries

Methods

_checkedOut

Method to create a checked out icon with optional overlib in a grid.

_checkedOut( &$row, boolean $overlib = true) : string
static
since

1.5

Arguments

$row

$overlib

booleanTrue if an overlib with checkout information should be created.

Response

stringHTMl for the icon and overlib

behavior

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

behavior() : void
static deprecated
since

1.6

deprecated

4.0 This is only used in hathor and will be removed without replacement

boolean

Display a boolean setting widget.

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

1.6

deprecated

4.0 This is only used in hathor and will be removed without replacement

Arguments

$i

integerThe row index.

$value

integerThe value of the boolean field.

$taskOn

stringTask to turn the boolean setting on.

$taskOff

stringTask to turn the boolean setting off.

Response

stringThe boolean setting widget.

checkall

Method to check all checkboxes in a grid

checkall(string $name = 'checkall-toggle', string $tip = 'JGLOBAL_CHECK_ALL', string $action = 'Joomla.checkAll(this)') : string
static
since

3.1.2

Arguments

$name

stringThe name of the form element

$tip

stringThe text shown as tooltip title instead of $tip

$action

stringThe action to perform on clicking the checkbox

Response

string

checkedOut

Displays a checked out icon.

checkedOut( &$row, integer $i, string $identifier = 'id') : string
static
since

1.5

Arguments

$row

$i

integerThe index of the row.

$identifier

stringThe 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', string $stub = 'cb') : mixed
static
since

1.5

Arguments

$rowNum

integerThe row index

$recId

integerThe record id

$checkedOut

booleanTrue if item is checked out

$name

stringThe name of the form element

$stub

stringThe name of stub identifier

Response

mixedString 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
static
since

1.5

Arguments

$rows

arrayThe array of rows of rows

$image

stringThe image [UNUSED]

$task

stringThe 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
static
since

1.5

Arguments

$value

mixedEither the scalar value or an object (for backward compatibility, deprecated)

$i

integerThe index

$img1

stringImage for a positive or on value

$img0

stringImage for the empty or off value

$prefix

stringAn 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 $tip = '', string $form = null) : string
static
since

1.5

Arguments

$title

stringThe link title

$order

stringThe order field for the column

$direction

stringThe current direction

$selected

stringThe selected ordering

$task

stringAn optional task override

$new_direction

stringAn optional direction for the new column

$tip

stringAn optional text shown as tooltip title instead of $title

$form

stringAn optional form selector

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 = 'JPUBLISHED', string $unpublished = 'JUNPUBLISHED', string $archived = null, string $trashed = null) : string
static
since

1.5

Arguments

$filter_state

stringThe initial filter state

$published

stringThe JText string for published

$unpublished

stringThe JText string for Unpublished

$archived

stringThe JText string for Archived

$trashed

stringThe JText string for Trashed

Response

string