JGrid

Utility class for creating HTML Grids

abstract
since

1.6

package

Application

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
static
since

1.6

Arguments

i

intThe row index

task

stringThe task to fire

prefix

string|arrayAn 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(int i, string editorName, string time, string|array prefix = '', bool enabled = false, string checkbox = 'cb', string formId = null) : string
static
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|arrayAn 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(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
static
see \Joomla\CMS\HTML\Helpers\JHtmlJGrid::state()
since

1.6

Arguments

value

intThe state value.

i

intThe row index

prefix

string|arrayAn 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(int i, string task = 'orderdown', string|array prefix = '', string text = 'JLIB_HTML_MOVE_DOWN', bool enabled = true, string checkbox = 'cb', string formId = null) : string
static
since

1.6

Arguments

i

intThe 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

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(int i, string task = 'orderup', string|array prefix = '', string text = 'JLIB_HTML_MOVE_UP', bool enabled = true, string checkbox = 'cb', string formId = null) : string
static
since

1.6

Arguments

i

intThe 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

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(int value, int i, string|array prefix = '', bool enabled = true, string checkbox = 'cb', string publishUp = null, string publishDown = null, string formId = null) : string
static
see \Joomla\CMS\HTML\Helpers\JHtmlJGrid::state()
since

1.6

Arguments

value

intThe state value.

i

intThe row index

prefix

string|arrayAn 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(array config = array()) : array
static
since

1.6

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

arrayThe 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
static
since

1.6

Arguments

states

arrayarray 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|arrayAn 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