JGrid
Utility class for creating HTML Grids
since |
1.6 |
---|---|
package |
Joomla CMS |
Methods
action
Returns an action on a grid
action( i, task, string|array prefix = '', activeTitle = '', inactiveTitle = '', tip = false, activeClass = '', inactiveClass = '', enabled = true, translate = true, checkbox = 'cb', formId = null) :
since |
1.6 |
---|
Arguments
- i
int
The row index- task
string
The task to fire- prefix
string|array<string|int, mixed>
An optional task prefix or an array of options- activeTitle
string
An optional active tooltip to display if $enable is true- inactiveTitle
string
An optional inactive tooltip to display if $enable is true- tip
bool
An optional setting for tooltip- activeClass
string
An optional active HTML class- inactiveClass
string
An optional inactive HTML class- enabled
bool
An optional setting for access control on the action.- translate
bool
An optional setting for translation.- checkbox
string
An optional prefix for checkboxes.- formId
string
An optional form selector.
Response
string
The HTML markup
checkedout
Returns a checked-out icon
checkedout( i, editorName, time, string|array prefix = '', enabled = false, checkbox = 'cb', formId = null) :
since |
1.6 |
---|
Arguments
- i
int
The row index.- editorName
string
The name of the editor.- time
string
The time that the object was checked out.- prefix
string|array<string|int, mixed>
An optional task prefix or an array of options- enabled
bool
True to enable the action.- checkbox
string
An optional prefix for checkboxes.- formId
string
An optional form selector.
Response
string
The HTML markup
isdefault
Returns an isDefault state on a grid
isdefault( value, i, string|array prefix = '', enabled = true, checkbox = 'cb', formId = null, active_class = 'icon-color-featured icon-star', inactive_class = 'icon-unfeatured') :
see | JHtmlJGrid::state() |
---|---|
since |
1.6 |
Arguments
- value
int
The state value.- i
int
The row index- prefix
string|array<string|int, mixed>
An optional task prefix or an array of options- enabled
bool
An optional setting for access control on the action.- checkbox
string
An optional prefix for checkboxes.- formId
string
An optional form selector.- active_class
string
The class for active items.- inactive_class
string
The class for inactive items.
Response
string
The HTML markup
orderDown
Creates an order-down action icon.
orderDown( i, task = 'orderdown', string|array prefix = '', text = 'JLIB_HTML_MOVE_DOWN', enabled = true, checkbox = 'cb', formId = null) :
since |
1.6 |
---|
Arguments
- i
int
The row index.- task
string
An optional task to fire.- prefix
string|array<string|int, mixed>
An optional task prefix or an array of options- text
string
An optional text to display- enabled
bool
An optional setting for access control on the action.- checkbox
string
An optional prefix for checkboxes.- formId
string
An optional form selector.
Response
string
The HTML markup
orderUp
Creates an order-up action icon.
orderUp( i, task = 'orderup', string|array prefix = '', text = 'JLIB_HTML_MOVE_UP', enabled = true, checkbox = 'cb', formId = null) :
since |
1.6 |
---|
Arguments
- i
int
The row index.- task
string
An optional task to fire.- prefix
string|array<string|int, mixed>
An optional task prefix or an array of options- text
string
An optional text to display- enabled
bool
An optional setting for access control on the action.- checkbox
string
An optional prefix for checkboxes.- formId
string
An optional form selector.
Response
string
The HTML markup
published
Returns a published state on a grid
published( value, i, string|array prefix = '', enabled = true, checkbox = 'cb', publishUp = null, publishDown = null, formId = null) :
see | JHtmlJGrid::state() |
---|---|
since |
1.6 |
Arguments
- value
int
The state value.- i
int
The row index- prefix
string|array<string|int, mixed>
An optional task prefix or an array of options- enabled
bool
An optional setting for access control on the action.- checkbox
string
An optional prefix for checkboxes.- publishUp
string
An optional start publishing date.- publishDown
string
An optional finish publishing date.- formId
string
An optional form selector.
Response
string
The HTML markup
publishedOptions
Returns an array of standard published state filter options.
publishedOptions(mixed||string|int config = []) : mixed||string|int
since |
1.6 |
---|
Arguments
- config
array<string|int, mixed>
An array of configuration options. This array can contain a list of key/value pairs where values are boolean and keys can be taken from 'published', 'unpublished', 'archived', 'trash', 'all'. These pairs determine which values are displayed.
Response
array<string|int, mixed>
The array of standard published state filter options
state
Returns a state on a grid
state(mixed||string|int states, value, i, string|array prefix = '', enabled = true, translate = true, checkbox = 'cb', formId = null) :
since |
1.6 |
---|
Arguments
- states
array<string|int, mixed>
array of value/state. Each state is an array of the form (task, text, active title, inactive title, tip (boolean), HTML active class, HTML inactive class) or ('task'=>task, 'text'=>text, 'active_title'=>active title, 'inactive_title'=>inactive title, 'tip'=>boolean, 'active_class'=>html active class, 'inactive_class'=>html inactive class)- value
int
The state value.- i
int
The row index- prefix
string|array<string|int, mixed>
An optional task prefix or an array of options- enabled
bool
An optional setting for access control on the action.- translate
bool
An optional setting for translation.- checkbox
string
An optional prefix for checkboxes.- formId
string
An optional form selector.
Response
string
The HTML markup