Grid
Utility class for creating HTML Grids
| since |
1.5 |
|---|---|
| package |
Joomla CMS |
Methods
_checkedOut
Method to create a checked out icon with optional overlib in a grid.
_checkedOut( &row, overlib = true) :
| since |
1.5 |
|---|
Arguments
- row
objectThe row object- overlib
boolTrue if an overlib with checkout information should be created.
Response
stringHTMl for the icon and overlib
checkall
Method to check all checkboxes in a grid
checkall( name = 'checkall-toggle', action = 'Joomla.checkAll(this)') :
| since |
3.1.2 |
|---|
Arguments
- name
stringThe name of the form element- action
stringThe action to perform on clicking the checkbox
Response
string
checkedOut
Displays a checked out icon.
checkedOut( &row, i, identifier = 'id') :
| since |
1.5 |
|---|
Arguments
- row
objectA data object (must contain checked out as a property).- i
intThe 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( rowNum, recId, checkedOut = false, name = 'cid', stub = 'cb', title = '', formId = null) :
| since |
1.5 |
|---|
Arguments
- rowNum
intThe row index- recId
intThe record id- checkedOut
boolTrue if item is checked out- name
stringThe name of the form element- stub
stringThe name of stub identifier- title
stringThe name of the item- formId
stringAn optional form selector.
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(mixed||string|int rows, image = 'filesave.png', task = 'saveorder') :
| since |
1.5 |
|---|
Arguments
- rows
array<string|int, mixed>The 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( value, i, img1 = 'tick.png', img0 = 'publish_x.png', prefix = '') :
| since |
1.5 |
|---|
Arguments
- value
mixedEither the scalar value or an object (for backward compatibility, deprecated)- i
intThe 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( title, order, direction = 'asc', selected = '', task = null, newDirection = 'asc', tip = '', form = null) :
| 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- newDirection
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( filterState = '*', published = 'JPUBLISHED', unpublished = 'JUNPUBLISHED', archived = null, trashed = null) :
| since |
1.5 |
|---|
Arguments
- filterState
stringThe initial filter state- published
stringThe Text string for published- unpublished
stringThe Text string for Unpublished- archived
stringThe Text string for Archived- trashed
stringThe Text string for Trashed
Response
string