class JHtmlJGrid

Utility class for creating HTML Grids

Methods

static  string
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')

Returns an action on a grid

static  string
state( array $states, integer $value, integer $i, string|array $prefix = '', boolean $enabled = true, boolean $translate = true, string $checkbox = 'cb')

Returns a state on a grid

static  string
published( integer $value, integer $i, string|array $prefix = '', boolean $enabled = true, string $checkbox = 'cb', string $publish_up = null, string $publish_down = null)

Returns a published state on a grid

static  string
isdefault( integer $value, integer $i, string|array $prefix = '', boolean $enabled = true, string $checkbox = 'cb')

Returns an isDefault state on a grid

static  string
publishedOptions( array $config = array())

Returns an array of standard published state filter options.

static  string
checkedout( integer $i, string $editorName, string $time, string|array $prefix = '', boolean $enabled = false, string $checkbox = 'cb')

Returns a checked-out icon

static  string
orderUp( integer $i, string $task = 'orderup', string|array $prefix = '', string $text = 'JLIB_HTML_MOVE_UP', boolean $enabled = true, string $checkbox = 'cb')

Creates an order-up action icon.

static  string
orderDown( integer $i, string $task = 'orderdown', string|array $prefix = '', string $text = 'JLIB_HTML_MOVE_DOWN', boolean $enabled = true, string $checkbox = 'cb')

Creates an order-down action icon.

Details

static string 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')

Returns an action on a grid

Parameters

integer $i The row index
string $task The task to fire
string|array $prefix An optional task prefix or an array of options
string $text An optional text to display [unused - @deprecated 4.0]
string $active_title An optional active tooltip to display if $enable is true
string $inactive_title An optional inactive tooltip to display if $enable is true
boolean $tip An optional setting for tooltip
string $active_class An optional active HTML class
string $inactive_class An optional inactive HTML class
boolean $enabled An optional setting for access control on the action.
boolean $translate An optional setting for translation.
string $checkbox An optional prefix for checkboxes.

Return Value

string The HTML markup

static string state( array $states, integer $value, integer $i, string|array $prefix = '', boolean $enabled = true, boolean $translate = true, string $checkbox = 'cb')

Returns a state on a grid

Parameters

array $states 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, 'activetitle'=>active title, 'inactivetitle'=>inactive title, 'tip'=>boolean, 'activeclass'=>html active class, 'inactiveclass'=>html inactive class)
integer $value The state value.
integer $i The row index
string|array $prefix An optional task prefix or an array of options
boolean $enabled An optional setting for access control on the action.
boolean $translate An optional setting for translation.
string $checkbox An optional prefix for checkboxes.

Return Value

string The HTML markup

static string published( integer $value, integer $i, string|array $prefix = '', boolean $enabled = true, string $checkbox = 'cb', string $publish_up = null, string $publish_down = null)

Returns a published state on a grid

Parameters

integer $value The state value.
integer $i The row index
string|array $prefix An optional task prefix or an array of options
boolean $enabled An optional setting for access control on the action.
string $checkbox An optional prefix for checkboxes.
string $publish_up An optional start publishing date.
string $publish_down An optional finish publishing date.

Return Value

string The HTML markup

See also

JHtmlJGrid::state()

static string isdefault( integer $value, integer $i, string|array $prefix = '', boolean $enabled = true, string $checkbox = 'cb')

Returns an isDefault state on a grid

Parameters

integer $value The state value.
integer $i The row index
string|array $prefix An optional task prefix or an array of options
boolean $enabled An optional setting for access control on the action.
string $checkbox An optional prefix for checkboxes.

Return Value

string The HTML markup

See also

JHtmlJGrid::state()

static string publishedOptions( array $config = array())

Returns an array of standard published state filter options.

Parameters

array $config 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.

Return Value

string The HTML markup

static string checkedout( integer $i, string $editorName, string $time, string|array $prefix = '', boolean $enabled = false, string $checkbox = 'cb')

Returns a checked-out icon

Parameters

integer $i The row index.
string $editorName The name of the editor.
string $time The time that the object was checked out.
string|array $prefix An optional task prefix or an array of options
boolean $enabled True to enable the action.
string $checkbox An optional prefix for checkboxes.

Return Value

string The HTML markup

static string orderUp( integer $i, string $task = 'orderup', string|array $prefix = '', string $text = 'JLIB_HTML_MOVE_UP', boolean $enabled = true, string $checkbox = 'cb')

Creates an order-up action icon.

Parameters

integer $i The row index.
string $task An optional task to fire.
string|array $prefix An optional task prefix or an array of options
string $text An optional text to display
boolean $enabled An optional setting for access control on the action.
string $checkbox An optional prefix for checkboxes.

Return Value

string The HTML markup

static string orderDown( integer $i, string $task = 'orderdown', string|array $prefix = '', string $text = 'JLIB_HTML_MOVE_DOWN', boolean $enabled = true, string $checkbox = 'cb')

Creates an order-down action icon.

Parameters

integer $i The row index.
string $task An optional task to fire.
string|array $prefix An optional task prefix or an array of options
string $text An optional text to display
boolean $enabled An optional setting for access control on the action.
string $checkbox An optional prefix for checkboxes.

Return Value

string The HTML markup