ListHelper
Utility class for creating different select lists
since |
1.5 |
---|---|
package |
Joomla CMS |
Methods
genericordering
Returns an array of options
genericordering(\Joomla\Database\DatabaseQuery|string query, chop = 30) : mixed||string|int
since |
1.5 |
---|
Arguments
- query
DatabaseQuery|string
SQL with 'ordering' AS value and 'name field' AS text- chop
int
The length of the truncated headline
Response
array<string|int, mixed>
An array of objects formatted for JHtml list processing
images
Build the select list to choose an image
images( name, active = null, javascript = null, directory = null, extensions = 'bmp|gif|jpg|png') : mixed||string|int
since |
1.5 |
---|
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<string|int, mixed>
Image names
ordering
Build the select list for Ordering derived from a query
ordering( name, query, attribs = null, selected = null, neworder = null, id = null) :
since |
1.6 |
---|
Arguments
- name
int
The scalar value- query
string
The query- attribs
string
HTML tag attributes- selected
string
The selected item- neworder
int
1 if new and first, -1 if new and last, 0 or null if existing item- id
string
ID attribute for the resulting
Response
string
HTML markup for the select list
positions
Select list of positions - generally used for location of images
positions( name, active = null, javascript = null, none = true, center = true, left = true, right = true, id = false) : mixed||string|int
since |
1.5 |
---|
Arguments
- name
string
Name of the field- active
string
The active value- javascript
string
Alternative javascript- none
bool
Null if not assigned- center
bool
Null if not assigned- left
bool
Null if not assigned- right
bool
Null if not assigned- id
bool
Null if not assigned
Response
array<string|int, mixed>
The positions
users
Select list of active users
users( name, active, nouser, javascript = null, order = 'name') :
since |
1.5 |
---|
Arguments
- name
string
The name of the field- active
string
The active user- nouser
int
If set include an option to select no user- javascript
string
Custom javascript- order
string
Specify a field to order by
Response
string
The HTML for a list of users list of users