Class JHtmlList
Utility class for creating different select lists
Methods summary
public 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
Build the select list to choose an image
Parameters
- $name
string - $name The name of the field
- $active
string - $active The selected item
- $javascript
string - $javascript Alternative javascript
- $directory
string - $directory Directory the images are stored in
- $extensions
string - $extensions Allowed extensions
Returns
array - Image names
Since
1.5
|
public static
array
|
#
genericordering( string $query, integer $chop = 30 )
Returns an array of options
Returns an array of options
Parameters
- $query
string - $query SQL with 'ordering' AS value and 'name field' AS text
- $chop
integer - $chop The length of the truncated headline
Returns
array - An array of objects formatted for JHtml list processing
Since
1.5
|
public 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
Build the select list for Ordering derived from a query
Parameters
- $name
integer - $name The scalar value
- $query
string - $query The query
- $attribs
string - $attribs HTML tag attributes
- $selected
string - $selected The selected item
- $neworder
integer - $neworder 1 if new and first, -1 if new and last, 0 or null if existing item
Returns
string - HTML markup for the select list
Since
1.6
|
public static
string
|
#
users( string $name, string $active, integer $nouser = 0, string $javascript = null, string $order = 'name' )
Select list of active users
Select list of active users
Parameters
- $name
string - $name The name of the field
- $active
string - $active The active user
- $nouser
integer - $nouser If set include an option to select no user
- $javascript
string - $javascript Custom javascript
- $order
string - $order Specify a field to order by
Returns
string - The HTML for a list of users list of users
Since
1.5
|
public 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
Select list of positions - generally used for location of images
Parameters
- $name
string - $name Name of the field
- $active
string - $active The active value
- $javascript
string - $javascript Alternative javascript
- $none
boolean - $none Null if not assigned
- $center
boolean - $center Null if not assigned
- $left
boolean - $left Null if not assigned
- $right
boolean - $right Null if not assigned
- $id
boolean - $id Null if not assigned
Returns
array - The positions
Since
1.5
|
Magic methods summary