protected function _getInput($fieldName, $options)
{
switch (strtolower($options['type'])) {
case 'select':
$opts = $options['options'];
unset($options['options']);
return $this->select($fieldName, $opts, $options);
case 'radio':
$opts = $options['options'];
unset($options['options']);
return $this->radio($fieldName, $opts, $options);
case 'multicheckbox':
$opts = $options['options'];
unset($options['options']);
return $this->multiCheckbox($fieldName, $opts, $options);
case 'input':
throw new RuntimeException("Invalid type 'input' used for field '{$fieldName}'");
default:
return $this->{$options['type']}($fieldName, $options);
}
}