JHtmlList

Utility class for creating different select lists

abstract
package

Joomla.Platform

subpackage

HTML

since

11.1

Methods

accesslevel

Get a grouped list of pre-Joomla 1.6 access levels

accesslevel( &$row) : string
static deprecated
since

11.1

deprecated

12.1 Use JHtml::_('access.assetgrouplist', 'access', $selected) instead

see \JHtmlAccess::assetgrouplist

Arguments

$row

Response

string

category

Crates a select list of categories

category(string $name, string $extension, string $selected = null, string $javascript = null, integer $order = null, integer $size = 1, boolean $sel_cat = 1) : string
static deprecated
deprecated

12.1 Use JHtmlCategory instead

since

11.1

see \JHtmlCategory

Arguments

$name

stringName of the field

$extension

stringExtension for which the categories will be listed

$selected

stringSelected value

$javascript

stringCustom javascript

$order

integerNot used.

$size

integerSize of the field

$sel_cat

booleanIf null do not include a Select Categories row

Response

string

genericordering

Returns an array of options

genericordering(string $sql, integer $chop = '30') : array
static
since

11.1

Arguments

$sql

stringSQL with 'ordering' AS value and 'name field' AS text

$chop

integerThe length of the truncated headline

Response

arrayAn array of objects formatted for JHtml list processing

images

Build the select list to choose an image

images(string $name, string $active = null, string $javascript = null, string $directory = null, string $extensions = "bmp|gif|jpg|png") : array
static
since

11.1

Arguments

$name

stringThe name of the field

$active

stringThe selected item

$javascript

stringAlternative javascript

$directory

stringDirectory the images are stored in

$extensions

stringAllowed extensions

Response

arrayImage names

ordering

Build the select list for Ordering derived from a query

ordering(integer $name, string $query, string $attribs = null, string $selected = null, integer $neworder = null, string $chop = null) : string
static
since

11.1

Arguments

$name

integerThe scalar value

$query

stringThe query

$attribs

stringHTML tag attributes

$selected

stringThe selected item

$neworder

integer1 if new and first, -1 if new and last, 0 or null if existing item

$chop

stringThe length of the truncated headline

Response

stringHtml for the select list

positions

Select list of positions - generally used for location of images

positions(string $name, string $active = null, string $javascript = null, boolean $none = 1, boolean $center = 1, boolean $left = 1, boolean $right = 1, boolean $id = false) : array
static
since

11.1

Arguments

$name

stringName of the field

$active

stringThe active value

$javascript

stringAlternative javascript

$none

booleanNull if not assigned

$center

booleanNull if not assigned

$left

booleanNull if not assigned

$right

booleanNull if not assigned

$id

booleanNull if not assigned

Response

arrayThe positions

specificordering

Build a select list with a specific ordering

specificordering(integer $value, integer $id, string $query, integer $neworder) : string
static deprecated
since

11.1

see \JHtmlList::ordering
deprecated

12.1 Use JHtml::_('list.ordering') instead

Arguments

$value

integerThe scalar value

$id

integerThe id for an existing item in the list

$query

stringThe query

$neworder

integer1 if new and first, -1 if new and last, 0 or null if existing item

Response

stringHtml for the ordered list

users

Select list of active users

users(string $name, string $active, integer $nouser, string $javascript = null, string $order = 'name', string $reg = 1) : string
static
since

11.1

Arguments

$name

stringThe name of the field

$active

stringThe active user

$nouser

integerIf set include an option to select no user

$javascript

stringCustom javascript

$order

stringSpecify a field to order by

$reg

stringDeprecated Excludes users who are explicitly in group 2.

Response

stringThe HTML for a list of users list of users