JGrid
Utility class for creating HTML Grids
since |
1.6 |
---|---|
package |
Joomla CMS |
Methods
action
Returns an action on a grid
action(int i, string task, string|array prefix = '', string activeTitle = '', string inactiveTitle = '', bool tip = false, string activeClass = '', string inactiveClass = '', bool enabled = true, bool translate = true, string checkbox = 'cb', string formId = null) : string
since |
1.6 |
---|
Arguments
- i
int
The row index- task
string
The task to fire- prefix
string|array
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(int i, string editorName, string time, string|array prefix = '', bool enabled = false, string checkbox = 'cb', string formId = null) : string
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
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(int value, int i, string|array prefix = '', bool enabled = true, string checkbox = 'cb', string formId = null, string active_class = 'icon-color-featured icon-star', string inactive_class = 'icon-unfeatured') : string
see | \Joomla\CMS\HTML\Helpers\JHtmlJGrid::state() |
---|---|
since |
1.6 |
Arguments
- value
int
The state value.- i
int
The row index- prefix
string|array
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(int i, string task = 'orderdown', string|array prefix = '', string text = 'JLIB_HTML_MOVE_DOWN', bool enabled = true, string checkbox = 'cb', string formId = null) : string
since |
1.6 |
---|
Arguments
- i
int
The row index.- task
string
An optional task to fire.- prefix
string|array
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(int i, string task = 'orderup', string|array prefix = '', string text = 'JLIB_HTML_MOVE_UP', bool enabled = true, string checkbox = 'cb', string formId = null) : string
since |
1.6 |
---|
Arguments
- i
int
The row index.- task
string
An optional task to fire.- prefix
string|array
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(int value, int i, string|array prefix = '', bool enabled = true, string checkbox = 'cb', string publishUp = null, string publishDown = null, string formId = null) : string
see | \Joomla\CMS\HTML\Helpers\JHtmlJGrid::state() |
---|---|
since |
1.6 |
Arguments
- value
int
The state value.- i
int
The row index- prefix
string|array
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(array config = array()) : array
since |
1.6 |
---|
Arguments
- config
array
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
The array of standard published state filter options
state
Returns a state on a grid
state(array states, int value, int i, string|array prefix = '', bool enabled = true, bool translate = true, string checkbox = 'cb', string formId = null) : string
since |
1.6 |
---|
Arguments
- states
array
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
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