class JHtmlList

Utility class for creating different select lists

Methods

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

Build the select list to choose an image

static  array
genericordering( string $query, integer $chop = 30)

Returns an array of options

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

Build the select list for Ordering derived from a query

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

Select list of active users

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

Select list of positions - generally used for location of images

Details

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

Build the select list to choose an image

Parameters

string $name The name of the field
string $active The selected item
string $javascript Alternative javascript
string $directory Directory the images are stored in
string $extensions Allowed extensions

Return Value

array Image names

static array genericordering( string $query, integer $chop = 30)

Returns an array of options

Parameters

string $query SQL with 'ordering' AS value and 'name field' AS text
integer $chop The length of the truncated headline

Return Value

array An array of objects formatted for JHtml list processing

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

Build the select list for Ordering derived from a query

Parameters

integer $name The scalar value
string $query The query
string $attribs HTML tag attributes
string $selected The selected item
integer $neworder 1 if new and first, -1 if new and last, 0 or null if existing item

Return Value

string HTML markup for the select list

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

Select list of active users

Parameters

string $name The name of the field
string $active The active user
integer $nouser If set include an option to select no user
string $javascript Custom javascript
string $order Specify a field to order by

Return Value

string The HTML for a list of users list of users

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

Select list of positions - generally used for location of images

Parameters

string $name Name of the field
string $active The active value
string $javascript Alternative javascript
boolean $none Null if not assigned
boolean $center Null if not assigned
boolean $left Null if not assigned
boolean $right Null if not assigned
boolean $id Null if not assigned

Return Value

array The positions