ListHelper

Utility class for creating different select lists

abstract
since

1.5

package

Application

Methods

genericordering

Returns an array of options

genericordering(\Joomla\Database\DatabaseQuery|string query, int chop = 30) : array
static
since

1.5

Arguments

query

\Joomla\Database\DatabaseQuery|stringSQL with 'ordering' AS value and 'name field' AS text

chop

intThe 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

1.5

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(int name, string query, string attribs = null, string selected = null, int neworder = null, string id = null) : string
static
since

1.6

Arguments

name

intThe scalar value

query

stringThe query

attribs

stringHTML tag attributes

selected

stringThe selected item

neworder

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

id

stringID attribute for the resulting