Class JHtmlList

Description

Utility class for creating different select lists

  • abstract:
  • since: 11.1

Located in /libraries/joomla/html/html/list.php (line 19)


	
			
Method Summary
static string accesslevel (object &$row)
static string category (string $name, string $extension, [string $selected = null], [string $javascript = null], [integer $order = null], [integer $size = 1], [boolean $sel_cat = 1])
static array genericordering (string $sql, [integer $chop = '30'])
static array images (string $name, [string $active = null], [string $javascript = null], [string $directory = null], [string $extensions = "bmp|gif|jpg|png"])
static string ordering (integer $name, string $query, [string $attribs = null], [string $selected = null], [integer $neworder = null], [string $chop = null])
static array positions (string $name, [string $active = null], [string $javascript = null], [boolean $none = 1], [boolean $center = 1], [boolean $left = 1], [boolean $right = 1], [boolean $id = false])
static string specificordering (integer $value, integer $id, string $query, [integer $neworder = 0])
static string users (string $name, string $active, [integer $nouser = 0], [string $javascript = null], [string $order = 'name'], [string $reg = 1])
Methods
static method accesslevel (line 33)

Get a grouped list of pre-Joomla 1.6 access levels

  • see: JHtmlAccess::assetgrouplist
  • deprecated: 12.1 Use JHtml::_('access.assetgrouplist', 'access', $selected) instead
  • since: 11.1
  • access: public
static string accesslevel (object &$row)
  • object &$row: The object (must have an access property).
static method category (line 351)

Crates a select list of categories

  • see: JHtmlCategory
  • deprecated: 12.1 Use JHtmlCategory instead
  • since: 11.1
  • access: public
static string category (string $name, string $extension, [string $selected = null], [string $javascript = null], [integer $order = null], [integer $size = 1], [boolean $sel_cat = 1])
  • string $name: Name of the field
  • string $extension: Extension for which the categories will be listed
  • string $selected: Selected value
  • string $javascript: Custom javascript
  • integer $order: Not used.
  • integer $size: Size of the field
  • boolean $sel_cat: If null do not include a Select Categories row
static method genericordering (line 103)

Returns an array of options

  • return: An array of objects formatted for JHtml list processing
  • since: 11.1
  • access: public
static array genericordering (string $sql, [integer $chop = '30'])
  • string $sql: SQL with 'ordering' AS value and 'name field' AS text
  • integer $chop: The length of the truncated headline
static method images (line 54)

Build the select list to choose an image

  • return: Image names
  • since: 11.1
  • access: public
static array images (string $name, [string $active = null], [string $javascript = null], [string $directory = null], [string $extensions = "bmp|gif|jpg|png"])
  • 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
static method ordering (line 199)

Build the select list for Ordering derived from a query

  • return: Html for the select list
  • since: 11.1
  • access: public
static string ordering (integer $name, string $query, [string $attribs = null], [string $selected = null], [integer $neworder = null], [string $chop = null])
  • 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
  • string $chop: The length of the truncated headline
static method positions (line 298)

Select list of positions - generally used for location of images

  • return: The positions
  • since: 11.1
  • access: public
static array positions (string $name, [string $active = null], [string $javascript = null], [boolean $none = 1], [boolean $center = 1], [boolean $left = 1], [boolean $right = 1], [boolean $id = false])
  • 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
static method specificordering (line 160)

Build a select list with a specific ordering

  • return: Html for the ordered list
  • see: JHtmlList::ordering
  • deprecated: 12.1 Use JHtml::_('list.ordering') instead
  • since: 11.1
  • access: public
static string specificordering (integer $value, integer $id, string $query, [integer $neworder = 0])
  • integer $value: The scalar value
  • integer $id: The id for an existing item in the list
  • string $query: The query
  • integer $neworder:
    1. if new and first, -1 if new and last, 0 or null if existing item
static method users (line 240)

Select list of active users

  • return: The HTML for a list of users list of users
  • since: 11.1
  • access: public
static string users (string $name, string $active, [integer $nouser = 0], [string $javascript = null], [string $order = 'name'], [string $reg = 1])
  • 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
  • string $reg: Deprecated Excludes users who are explicitly in group 2.

Documentation generated on Mon, 25 Jun 2012 13:56:24 -0500 by phpDocumentor 1.4.4