Joomla CMS  4.2.2
Documentation des API du CMS Joomla en version 4.2.2
Référence de la classe ListHelper

Fonctions membres publiques statiques

static images ($name, $active=null, $javascript=null, $directory=null, $extensions='bmp|gif|jpg|png')
 
static genericordering ($query, $chop=30)
 
static ordering ($name, $query, $attribs=null, $selected=null, $neworder=null, ?string $id=null)
 
static users ($name, $active, $nouser=0, $javascript=null, $order='name')
 
static positions ( $name, $active=null, $javascript=null, $none=true, $center=true, $left=true, $right=true, $id=false)
 

Description détaillée

Utility class for creating different select lists

Depuis
1.5

Documentation des fonctions membres

◆ genericordering()

static genericordering (   $query,
  $chop = 30 
)
static

Returns an array of options

Paramètres
DatabaseQuery | string$querySQL with 'ordering' AS value and 'name field' AS text
integer$chopThe length of the truncated headline
Renvoie
array An array of objects formatted for JHtml list processing
Depuis
1.5

Références $db, $i, $items, $n, $options, $query, $text, Text\_(), HTMLHelper\_(), Factory\getDbo(), text, et value.

◆ images()

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

Build the select list to choose an image

Paramètres
string$nameThe name of the field
string$activeThe selected item
string$javascriptAlternative javascript
string$directoryDirectory the images are stored in
string$extensionsAllowed extensions
Renvoie
array Image names
Depuis
1.5

Références $active, $images, $name, Text\_(), HTMLHelper\_(), et JPATH_SITE.

◆ ordering()

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

Build the select list for Ordering derived from a query

Paramètres
integer$nameThe scalar value
string$queryThe query
string$attribsHTML tag attributes
string$selectedThe selected item
integer$neworder1 if new and first, -1 if new and last, 0 or null if existing item
string$idID attribute for the resulting <select> element
Renvoie
string HTML markup for the select list
Depuis
1.6

Références $attribs, $html, $id, $name, $query, $selected, $text, Text\_(), HTMLHelper\_(), et elseif.

◆ positions()

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

Select list of positions - generally used for location of images

Paramètres
string$nameName of the field
string$activeThe active value
string$javascriptAlternative javascript
boolean$noneNull if not assigned
boolean$centerNull if not assigned
boolean$leftNull if not assigned
boolean$rightNull if not assigned
boolean$idNull if not assigned
Renvoie
array The positions
Depuis
1.5

Références $active, $id, $name, $positions, Text\_(), HTMLHelper\_(), et null.

◆ users()

static users (   $name,
  $active,
  $nouser = 0,
  $javascript = null,
  $order = 'name' 
)
static

Select list of active users

Paramètres
string$nameThe name of the field
string$activeThe active user
integer$nouserIf set include an option to select no user
string$javascriptCustom javascript
string$orderSpecify a field to order by
Renvoie
string The HTML for a list of users list of users
Depuis
1.5

Références $active, $db, $name, $query, Text\_(), HTMLHelper\_(), et Factory\getDbo().


La documentation de cette classe a été générée à partir du fichier suivant :