JHtmlList
Utility class for creating different select lists
package |
Joomla.Platform |
---|---|
subpackage |
HTML |
since |
11.1 |
Methods
accesslevel
Get a grouped list of pre-Joomla 1.6 access levels
accesslevel( &$row) : string
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
deprecated |
12.1 Use JHtmlCategory instead |
---|---|
since |
11.1 |
see | \JHtmlCategory |
Arguments
- $name
string
Name of the field- $extension
string
Extension for which the categories will be listed- $selected
string
Selected value- $javascript
string
Custom javascript- $order
integer
Not used.- $size
integer
Size of the field- $sel_cat
boolean
If null do not include a Select Categories row
Response
string
genericordering
Returns an array of options
genericordering(string $sql, integer $chop = '30') : array
since |
11.1 |
---|
Arguments
- $sql
string
SQL with 'ordering' AS value and 'name field' AS text- $chop
integer
The length of the truncated headline
Response
array
An 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
since |
11.1 |
---|
Arguments
- $name
string
The name of the field- $active
string
The selected item- $javascript
string
Alternative javascript- $directory
string
Directory the images are stored in- $extensions
string
Allowed extensions
Response
array
Image 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
since |
11.1 |
---|
Arguments
- $name
integer
The scalar value- $query
string
The query- $attribs
string
HTML tag attributes- $selected
string
The selected item- $neworder
integer
1 if new and first, -1 if new and last, 0 or null if existing item- $chop
string
The length of the truncated headline
Response
string
Html 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
since |
11.1 |
---|
Arguments
- $name
string
Name of the field- $active
string
The active value- $javascript
string
Alternative javascript- $none
boolean
Null if not assigned- $center
boolean
Null if not assigned- $left
boolean
Null if not assigned- $right
boolean
Null if not assigned- $id
boolean
Null if not assigned
Response
array
The positions
specificordering
Build a select list with a specific ordering
specificordering(integer $value, integer $id, string $query, integer $neworder) : string
since |
11.1 |
---|---|
see | \JHtmlList::ordering |
deprecated |
12.1 Use JHtml::_('list.ordering') instead |
Arguments
- $value
integer
The scalar value- $id
integer
The id for an existing item in the list- $query
string
The query- $neworder
integer
1 if new and first, -1 if new and last, 0 or null if existing item
Response
string
Html 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
since |
11.1 |
---|
Arguments
- $name
string
The name of the field- $active
string
The active user- $nouser
integer
If set include an option to select no user- $javascript
string
Custom javascript- $order
string
Specify a field to order by- $reg
string
Deprecated Excludes users who are explicitly in group 2.
Response
string
The HTML for a list of users list of users