Back to Joomla project (class list)

Class ListHelper - list of methods

Utility class for creating different select lists
Package: Joomla\CMS\HTML\Helpers
Copyright: (C) 2007 Open Source Matters, Inc.
License: GNU General Public License version 2 or later; see LICENSE.txt
Located at: Joomla/HTML/Helpers/ListHelper.php
Project: Joomla

Method Summary

public static array
(mixed $name, mixed $active = null, mixed $javascript = null, mixed $directory = null, mixed $extensions = 'bmp|gif|jpg|png')

Build the select list to choose an image
Parameters
  • 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
Returns
  • array Image names
Since
  • 1.5
Show source code of this method: images Source Code

public static array
(mixed $query, mixed $chop = 30)

Returns an array of options
Parameters
  • \Joomla\Database\DatabaseQuery|string $query SQL with 'ordering' AS value and 'name field' AS text
  • int $chop The length of the truncated headline
Returns
  • array An array of objects formatted for JHtml list processing
Since
  • 1.5
Show source code of this method: genericordering Source Code

public static string
(mixed $name, mixed $query, mixed $attribs = null, mixed $selected = null, mixed $neworder = null, ?string $id = null)

Build the select list for Ordering derived from a query
Parameters
  • int $name The scalar value
  • string $query The query
  • string $attribs HTML tag attributes
  • string $selected The selected item
  • int $neworder 1 if new and first, -1 if new and last, 0 or null if existing item
  • string $id ID attribute for the resulting <select> element
Returns
  • string HTML markup for the select list
Since
  • 1.6
Show source code of this method: ordering Source Code

public static string
(mixed $name, mixed $active, mixed $nouser = 0, mixed $javascript = null, mixed $order = 'name')

Select list of active users
Parameters
  • string $name The name of the field
  • string $active The active user
  • int $nouser If set include an option to select no user
  • string $javascript Custom javascript
  • string $order Specify a field to order by
Returns
  • string The HTML for a list of users list of users
Since
  • 1.5
Show source code of this method: users Source Code

public static array
(mixed $name, mixed $active = null, mixed $javascript = null, mixed $none = true, mixed $center = true, mixed $left = true, mixed $right = true, mixed $id = false)

Select list of positions - generally used for location of images
Parameters
  • string $name Name of the field
  • string $active The active value
  • string $javascript Alternative javascript
  • bool $none Null if not assigned
  • bool $center Null if not assigned
  • bool $left Null if not assigned
  • bool $right Null if not assigned
  • bool $id Null if not assigned
Returns
  • array The positions
Since
  • 1.5
Show source code of this method: positions Source Code

Tags Summary

Since
1.5