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(object &row, bool overlib = true) : string
since |
1.5 |
---|
Arguments
- row
object
The row object- overlib
bool
True if an overlib with checkout information should be created.
Response
string
HTMl for the icon and overlib
checkall
Method to check all checkboxes in a grid
checkall(string name = 'checkall-toggle', string action = 'Joomla.checkAll(this)') : string
since |
3.1.2 |
---|
Arguments
- name
string
The name of the form element- action
string
The action to perform on clicking the checkbox
Response
string
checkedOut
Displays a checked out icon.
checkedOut(object &row, int i, string identifier = 'id') : string
since |
1.5 |
---|
Arguments
- row
object
A data object (must contain checked out as a property).- i
int
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(int rowNum, int recId, bool checkedOut = false, string name = 'cid', string stub = 'cb', string title = '', string formId = null) : mixed
since |
1.5 |
---|
Arguments
- rowNum
int
The row index- recId
int
The record id- checkedOut
bool
True if item is checked out- name
string
The name of the form element- stub
string
The name of stub identifier- title
string
The name of the item- formId
string
An optional form selector.
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 |
1.5 |
---|
Arguments
- rows
array
The array of rows of rows- image
string
The image [UNUSED]- 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, int i, string img1 = 'tick.png', string img0 = 'publish_x.png', string prefix = '') : string
since |
1.5 |
---|
Arguments
- value
mixed
Either the scalar value or an object (for backward compatibility, deprecated)- i
int
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 newDirection = 'asc', string tip = '', string form = null) : string
since |
1.5 |
---|
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- newDirection
string
An optional direction for the new column- tip
string
An optional text shown as tooltip title instead of $title- form
string
An 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 filterState = '*', string published = 'JPUBLISHED', string unpublished = 'JUNPUBLISHED', string archived = null, string trashed = null) : string
since |
1.5 |
---|
Arguments
- filterState
string
The initial filter state- published
string
The Text string for published- unpublished
string
The Text string for Unpublished- archived
string
The Text string for Archived- trashed
string
The Text string for Trashed
Response
string