JHtmlJGrid

Utility class for creating HTML Grids

abstract
since

1.6

package

Joomla.Libraries

Methods

action

Returns an action on a grid

action(integer $i, string $task, string|array $prefix = '', string $text = '', string $activeTitle = '', string $inactiveTitle = '', boolean $tip = false, string $activeClass = '', string $inactiveClass = '', boolean $enabled = true, boolean $translate = true, string $checkbox = 'cb') : string
static
since

1.6

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 [unused - @deprecated 4.0]

$activeTitle

stringAn optional active tooltip to display if $enable is true

$inactiveTitle

stringAn optional inactive tooltip to display if $enable is true

$tip

booleanAn optional setting for tooltip

$activeClass

stringAn optional active HTML class

$inactiveClass

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 markup

checkedout

Returns a checked-out icon

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

1.6

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 HTML markup

isdefault

Returns an isDefault state on a grid

isdefault(integer $value, integer $i, string|array $prefix = '', boolean $enabled = true, string $checkbox = 'cb') : string
static
see \JHtmlJGrid::state()
since

1.6

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 markup

orderDown

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

1.6

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 HTML markup

orderUp

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

1.6

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 HTML markup

published

Returns a published state on a grid

published(integer $value, integer $i, string|array $prefix = '', boolean $enabled = true, string $checkbox = 'cb', string $publishUp = null, string $publishDown = null) : string
static
see \JHtmlJGrid::state()
since

1.6

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.

$publishUp

stringAn optional start publishing date.

$publishDown

stringAn optional finish publishing date.

Response

stringThe HTML markup

publishedOptions

Returns an array of standard published state filter options.

publishedOptions(array $config = array()) : string
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

stringThe HTML markup

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

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 markup