Source for file HtmlSelect.php
Documentation is available at HtmlSelect.php
// +----------------------------------------------------------------------+
// | PEAR :: I18Nv2 :: DecoratedList :: HtmlSelect |
// +----------------------------------------------------------------------+
// | This source file is subject to version 3.0 of the PHP license, |
// | that is available at http://www.php.net/license/3_0.txt |
// | If you did not receive a copy of the PHP license and are unable |
// | to obtain it through the world-wide-web, please send a note to |
// | license@php.net so we can mail you a copy immediately. |
// +----------------------------------------------------------------------+
// | Copyright (c) 2004 Michael Wallner <mike@iworks.at> |
// +----------------------------------------------------------------------+
// $Id: HtmlSelect.php,v 1.5 2004/05/03 15:01:28 mike Exp $
require_once 'I18Nv2/DecoratedList.php';
* I18Nv2_DecoratedList_HtmlSelect
* require_once 'I18Nv2/Country.php';
* require_once 'I18Nv2/DecoratedList/HtmlSelect.php';
* $country = &new I18Nv2_Country('de', 'iso-8859-1');
* $select = &new I18Nv2_DecoratedList_HtmlSelect($country);
* $select->attributes['select']['name'] = 'country';
* $select->selected['DE'] = true;
* echo $select->getAllCodes();
* @author Michael Wallner <mike@php.net>
* @version $Revision: 1.5 $
* HTML attributes of the select and the option tags
* $HtmlSelect->attributes['select']['onchange'] = 'this.form.submit()';
* $HtmlSelect->selected[$code] = true;
$codes = $this->list->getAllCodes ();
'<option ' . $this->_optAttr ($key) . '>' .
'<select ' . $this->_getAttr () . '>' .
* Get HTML attributes for the option tag
$attributes = 'value="' . $key . '" ' . $this->_getAttr ('option');
$attributes .= 'selected="selected"';
function _getAttr ($of = 'select')
foreach ($this->attributes[$of] as $attr => $value) {
$attributes .= $attr . '="' . $value . '" ';
Documentation generated on Mon, 11 Mar 2019 13:54:50 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.
|