setMultiple(true);
}
/**
*
* return the value(s) of the element, either the element's data or default value(s)
*
* @param string $key
*
* @return mixed
*/
public function getValue($key = null)
{
$value = parent::getValue();
if ($key !== null) {
if (array_key_exists($key, (array)$value)) {
return $value[$key];
}
else {
return null;
}
}
return $value;
}
/**
*
* render composite element
*
* @return string
*/
public function render()
{
return $this->getPrefix() . ' '
. '_name . '[' . self::RANGE_FROM . ']' . '" '
. $this->renderAttributes()
. 'value="' . $this->getValue(self::RANGE_FROM) . '" '
. $this->_endTag . ' '
. $this->getSuffix()
. ' - '
. $this->getPrefix() . ' '
. '_name . '[' . self::RANGE_TO . ']' . '" '
. $this->renderAttributes()
. 'value="' . $this->getValue(self::RANGE_TO) . '" '
. $this->_endTag . ' '
. $this->getSuffix();
}
}