JHtmlJGrid
Utility class for creating HTML Grids
| package |
Joomla.Platform |
|---|---|
| subpackage |
HTML |
| since |
11.1 |
Methods
action
Returns an action on a grid
action(integer $i, string $task, string|array $prefix = '', string $text = '', string $active_title = '', string $inactive_title = '', boolean $tip = false, string $active_class = '', string $inactive_class = '', boolean $enabled = true, boolean $translate = true, string $checkbox = 'cb') : string
| since |
11.1 |
|---|
Arguments
- $i
integerThe row index- $task
stringThe task to fire- $prefix
string|arrayAn optional task prefix or an array of options- $text
stringAn optional text to display- $active_title
stringAn optional active tooltip to display if $enable is true- $inactive_title
stringAn optional inactive tooltip to display if $enable is true- $tip
booleanAn optional setting for tooltip- $active_class
stringAn optional active HTML class- $inactive_class
stringAn optional inactive HTML class- $enabled
booleanAn optional setting for access control on the action.- $translate
booleanAn optional setting for translation.- $checkbox
stringAn optional prefix for checkboxes.
Response
stringThe Html code
checkedout
Returns a checked-out icon
checkedout(integer $i, string $editorName, string $time, string|array $prefix = '', boolean $enabled = false, string $checkbox = 'cb') : string
| since |
11.1 |
|---|
Arguments
- $i
integerThe row index.- $editorName
stringThe name of the editor.- $time
stringThe time that the object was checked out.- $prefix
string|arrayAn optional task prefix or an array of options- $enabled
booleanTrue to enable the action.- $checkbox
stringAn optional prefix for checkboxes.
Response
stringThe required HTML.
isdefault
Returns a isDefault state on a grid
isdefault(integer $value, integer $i, string|array $prefix = '', boolean $enabled = true, string $checkbox = 'cb') : string
| see | \JHtmlJGrid::state |
|---|---|
| since |
11.1 |
Arguments
- $value
integerThe state value.- $i
integerThe row index- $prefix
string|arrayAn optional task prefix or an array of options- $enabled
booleanAn optional setting for access control on the action.- $checkbox
stringAn optional prefix for checkboxes.
Response
stringThe HTML code
orderDown
Creates a order-down action icon.
orderDown(integer $i, string $task = 'orderdown', string|array $prefix = '', string $text = 'JLIB_HTML_MOVE_DOWN', boolean $enabled = true, string $checkbox = 'cb') : string
| since |
11.1 |
|---|
Arguments
- $i
integerThe row index.- $task
stringAn optional task to fire.- $prefix
string|arrayAn optional task prefix or an array of options- $text
stringAn optional text to display- $enabled
booleanAn optional setting for access control on the action.- $checkbox
stringAn optional prefix for checkboxes.
Response
stringThe required HTML.
orderUp
Creates a order-up action icon.
orderUp(integer $i, string $task = 'orderup', string|array $prefix = '', string $text = 'JLIB_HTML_MOVE_UP', boolean $enabled = true, string $checkbox = 'cb') : string
| since |
11.1 |
|---|
Arguments
- $i
integerThe row index.- $task
stringAn optional task to fire.- $prefix
string|arrayAn optional task prefix or an array of options- $text
stringAn optional text to display- $enabled
booleanAn optional setting for access control on the action.- $checkbox
stringAn optional prefix for checkboxes.
Response
stringThe required HTML.
published
Returns a published state on a grid
published(integer $value, integer $i, string|array $prefix = '', boolean $enabled = true, string $checkbox = 'cb', string $publish_up = null, string $publish_down = null) : string
| see | \JHtmlJGrid::state |
|---|---|
| since |
11.1 |
Arguments
- $value
integerThe state value.- $i
integerThe row index- $prefix
string|arrayAn optional task prefix or an array of options- $enabled
booleanAn optional setting for access control on the action.- $checkbox
stringAn optional prefix for checkboxes.- $publish_up
stringAn optional start publishing date.- $publish_down
stringAn optional finish publishing date.
Response
stringThe Html code
publishedOptions
Returns an array of standard published state filter options.
publishedOptions(array $config = array()) : string
| since |
11.1 |
|---|
Arguments
- $config
arrayAn 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
stringThe HTML code for the select tag
state
Returns a state on a grid
state(array $states, integer $value, integer $i, string|array $prefix = '', boolean $enabled = true, boolean $translate = true, string $checkbox = 'cb') : string
| since |
11.1 |
|---|
Arguments
- $states
arrayarray of value/state. Each state is an array of the form (task, text, title,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
integerThe state value.- $i
integerThe row index- $prefix
string|arrayAn optional task prefix or an array of options- $enabled
booleanAn optional setting for access control on the action.- $translate
booleanAn optional setting for translation.- $checkbox
stringAn optional prefix for checkboxes.
Response
stringThe Html code