Support Joomla!

Packages

Package: Joomla-Framework

License

Content on this site is copyright © 2005 - 2008 Open Source Matters Inc and can be used in accordance with the Joomla! Electronic Documentation License. Some parts of this website may be subject to other licenses.

 Class JHTMLSelect

Description

Utility class for creating HTML select lists

  • since: 1.5

Located in /joomla/html/html/select.php (line 23)

Class JHTMLSelect   (Subpackage HTML)
Method Summary
Method string booleanlist (string $name, [string $attribs = null], [mixed $selected = null], [ $yes = 'yes'], [ $no = 'no'], [ $id = false])
Method string genericlist (array $arr, string $name, [string $attribs = null], [string $key = 'value'], [string $text = 'text'], [mixed $selected = NULL], [ $idtag = false], [ $translate = false])
Method string integerlist (int $start, int $end, int $inc, string $name, [string $attribs = null], [mixed $selected = null], [string $format = ""])
Method object optgroup (string $text, [string $value_name = 'value'], [string $text_name = 'text'])
Method object option (string $value, [string $text = ''], [string $value_name = 'value'], [string $text_name = 'text'], [ $disable = false])
Method string options (array $arr, [string $key = 'value'], [string $text = 'text'], [mixed $selected = null], [ $translate = false])
Method string radiolist (array $arr, string $name, [string $attribs = null], [mixed $key = 'value'], [string $text = 'text'], [string $selected = null], [ $idtag = false], [ $translate = false])
Methods
booleanlist (line 267)

Generates a yes/no radio list

  • return: HTML for the radio list
string booleanlist (string $name, [string $attribs = null], [mixed $selected = null], [ $yes = 'yes'], [ $no = 'no'], [ $id = false])
  • string $name: The value of the HTML name attribute
  • string $attribs: Additional HTML attributes for the <select> tag
  • mixed $selected: The key that is selected
  • $yes
  • $no
  • $id
genericlist (line 151)

Generates an HTML select list

  • return: HTML for the select list
string genericlist (array $arr, string $name, [string $attribs = null], [string $key = 'value'], [string $text = 'text'], [mixed $selected = NULL], [ $idtag = false], [ $translate = false])
  • array $arr: An array of objects
  • string $name: The value of the HTML name attribute
  • string $attribs: Additional HTML attributes for the <select> tag
  • string $key: The name of the object variable for the option value
  • string $text: The name of the object variable for the option text
  • mixed $selected: The key that is selected (accepts an array or a string)
  • $idtag
  • $translate
integerlist (line 189)

Generates a select list of integers

  • return: HTML for the select list
string integerlist (int $start, int $end, int $inc, string $name, [string $attribs = null], [mixed $selected = null], [string $format = ""])
  • int $start: The start integer
  • int $end: The end integer
  • int $inc: The increment
  • string $name: The value of the HTML name attribute
  • string $attribs: Additional HTML attributes for the <select> tag
  • mixed $selected: The key that is selected
  • string $format: The printf format to be applied to the number
optgroup (line 47)
object optgroup (string $text, [string $value_name = 'value'], [string $text_name = 'text'])
  • string $text: The text for the option
  • string $value_name: The returned object property name for the value
  • string $text_name: The returned object property name for the text
option (line 32)
object option (string $value, [string $text = ''], [string $value_name = 'value'], [string $text_name = 'text'], [ $disable = false])
  • string $value: The value of the option
  • string $text: The text for the option
  • string $value_name: The returned object property name for the value
  • string $text_name: The returned object property name for the text
  • $disable
options (line 64)

Generates just the option tags for an HTML select list

  • return: HTML for the select list
string options (array $arr, [string $key = 'value'], [string $text = 'text'], [mixed $selected = null], [ $translate = false])
  • array $arr: An array of objects
  • string $key: The name of the object variable for the option value
  • string $text: The name of the object variable for the option text
  • mixed $selected: The key that is selected (accepts an array or a string)
  • $translate
radiolist (line 216)

Generates an HTML radio list

  • return: HTML for the select list
string radiolist (array $arr, string $name, [string $attribs = null], [mixed $key = 'value'], [string $text = 'text'], [string $selected = null], [ $idtag = false], [ $translate = false])
  • array $arr: An array of objects
  • string $name: The value of the HTML name attribute
  • string $attribs: Additional HTML attributes for the <select> tag
  • mixed $key: The key that is selected
  • string $text: The name of the object variable for the option value
  • string $selected: The name of the object variable for the option text
  • $idtag
  • $translate

Documentation generated on Sat, 14 Nov 2009 11:18:39 +0000 by phpDocumentor 1.3.1