13 return str_replace(
'[name]', $this->name, sprintf($this->cfg->template,
15 array_merge($this->html, array(
16 'name'=>$this->name.
'[0]',
17 'id'=>$this->makeId($this->name.
'[0]'),
18 'value'=>$this->
getValue(
'min',
'input'),
21 array_merge($this->html, array(
22 'name'=>$this->name.
'[1]',
23 'id'=>$this->makeId($this->name.
'[1]'),
24 'value'=>$this->
getValue(
'max',
'input'),
36 public function setValue($value, $refill=
false, $key=null) {
38 if (is_array($value)) {
39 $min = array_key_exists(
'min', $value)? $value[
'min'] : (array_key_exists(0, $value)? $value[0] : null);
40 $max = array_key_exists(
'max', $value)? $value[
'max'] : (array_key_exists(1, $value)? $value[1] : null);
41 $this->cfg->setInArray(
'rangeValue',
'min', $min);
42 $this->cfg->setInArray(
'rangeValue',
'max', $max);
43 $this->cfg->value = $value;
44 }
else if (!is_null($key)) {
45 $this->cfg->setInArray(
'rangeValue', $key, $value);
46 $this->cfg->setInArray(
'value', $key, $value);
57 public function getValue($key=null, $mode=
'raw') {
59 $ret = $this->cfg->getInArray(
'rangeValue', $key);
61 $ret = $this->rangeValue;
static htmlOut($val, $key=false)
static htmlDeOut($val, $key=false)
static htmlTag($tag, array $attributes, $content=null)