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
intThe row index- task
stringThe task to fire- prefix
string|array<string|int, mixed>An optional task prefix or an array of options- activeTitle
stringAn optional active tooltip to display if $enable is true- inactiveTitle
stringAn optional inactive tooltip to display if $enable is true- tip
boolAn optional setting for tooltip- activeClass
stringAn optional active HTML class- inactiveClass
stringAn optional inactive HTML class- enabled
boolAn optional setting for access control on the action.- translate
boolAn optional setting for translation.- checkbox
stringAn optional prefix for checkboxes.- formId
stringAn optional form selector.
Response
stringThe 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
intThe row index.- editorName
stringThe name of the editor.- time
stringThe time that the object was checked out.- prefix
string|array<string|int, mixed>An optional task prefix or an array of options- enabled
boolTrue to enable the action.- checkbox
stringAn optional prefix for checkboxes.- formId
stringAn optional form selector.
Response
stringThe 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
intThe state value.- i
intThe row index- prefix
string|array<string|int, mixed>An optional task prefix or an array of options- enabled
boolAn optional setting for access control on the action.- checkbox
stringAn optional prefix for checkboxes.- formId
stringAn optional form selector.- active_class
stringThe class for active items.- inactive_class
stringThe class for inactive items.
Response
stringThe 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
intThe row index.- task
stringAn optional task to fire.- prefix
string|array<string|int, mixed>An optional task prefix or an array of options- text
stringAn optional text to display- enabled
boolAn optional setting for access control on the action.- checkbox
stringAn optional prefix for checkboxes.- formId
stringAn optional form selector.
Response
stringThe 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
intThe row index.- task
stringAn optional task to fire.- prefix
string|array<string|int, mixed>An optional task prefix or an array of options- text
stringAn optional text to display- enabled
boolAn optional setting for access control on the action.- checkbox
stringAn optional prefix for checkboxes.- formId
stringAn optional form selector.
Response
stringThe 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
intThe state value.- i
intThe row index- prefix
string|array<string|int, mixed>An optional task prefix or an array of options- enabled
boolAn optional setting for access control on the action.- checkbox
stringAn optional prefix for checkboxes.- publishUp
stringAn optional start publishing date.- publishDown
stringAn optional finish publishing date.- formId
stringAn optional form selector.
Response
stringThe 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
intThe state value.- i
intThe row index- prefix
string|array<string|int, mixed>An optional task prefix or an array of options- enabled
boolAn optional setting for access control on the action.- translate
boolAn optional setting for translation.- checkbox
stringAn optional prefix for checkboxes.- formId
stringAn optional form selector.
Response
stringThe HTML markup