Support Joomla!

Joomla! 1.5 Documentation

Packages

Package: Joomla-Framework

Developer Network License

The Joomla! Developer Network content is © copyright 2006 by the individual contributors and can be used in accordance with the Creative Commons License, Attribution- NonCommercial- ShareAlike 2.5

 Class JHTMLSelect

Description

Utility class for creating HTML select lists

  • since: 1.5

Located in /joomla/html/html.php (line 280)

Class JHTMLSelect   (Subpackage HTML)
Method Summary
Method string genericList (array $arr, string $tag_name, string $tag_attribs, string $key, string $text, [mixed $selected = NULL], [ $idtag = false], [ $flag = false])
Method string integerList (int $start, int $end, int $inc, string $tag_name, string $tag_attribs, mixed $selected, [string $format = ""])
Method void option ( $value, [ $text = ''], [ $value_name = 'value'], [ $text_name = 'text'])
Method string radioList (array $arr, string $tag_name, string $tag_attribs, [mixed $selected = null], [string $key = 'value'], [string $text = 'text'], [ $idtag = false])
Method string yesnoList (string $tag_name, string $tag_attribs, mixed $selected, [ $yes = 'yes'], [ $no = 'no'], [ $id = false])
Methods
genericList (line 301)

Generates an HTML select list

  • return: HTML for the select list
string genericList (array $arr, string $tag_name, string $tag_attribs, string $key, string $text, [mixed $selected = NULL], [ $idtag = false], [ $flag = false])
  • array $arr: An array of objects
  • string $tag_name: The value of the HTML name attribute
  • string $tag_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
  • $flag
integerList (line 382)

Generates a select list of integers

  • return: HTML for the select list
string integerList (int $start, int $end, int $inc, string $tag_name, string $tag_attribs, mixed $selected, [string $format = ""])
  • int $start: The start integer
  • int $end: The end integer
  • int $inc: The increment
  • string $tag_name: The value of the HTML name attribute
  • string $tag_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
option (line 282)
void option ( $value, [ $text = ''], [ $value_name = 'value'], [ $text_name = 'text'])
  • $value
  • $text
  • $value_name
  • $text_name
radioList (line 408)

Generates an HTML radio list

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

Generates a yes/no radio list

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

Documentation generated on Mon, 05 Mar 2007 21:06:36 +0000 by phpDocumentor 1.3.1