protected function _getInput($fieldName, $options)
    {
        $label = $options['labelOptions'];
        unset($options['labelOptions']);
        switch (strtolower($options['type'])) {
            case 'select':
                $opts = $options['options'];
                unset($options['options']);

                return $this->select($fieldName, $opts, $options + ['label' => $label]);
            case 'radio':
                $opts = $options['options'];
                unset($options['options']);

                return $this->radio($fieldName, $opts, $options + ['label' => $label]);
            case 'multicheckbox':
                $opts = $options['options'];
                unset($options['options']);

                return $this->multiCheckbox($fieldName, $opts, $options + ['label' => $label]);
            case 'input':
                throw new RuntimeException("Invalid type 'input' used for field '$fieldName'");

            default:
                return $this->{$options['type']}($fieldName, $options);
        }
    }
protected function _getInput($fieldName, $options)
    {
        $label = $options['labelOptions'];
        unset($options['labelOptions']);
        switch (strtolower($options['type'])) {
            case 'select':
                $opts = $options['options'];
                unset($options['options']);

                return $this->select($fieldName, $opts, $options + ['label' => $label]);
            case 'radio':
                $opts = $options['options'];
                unset($options['options']);

                return $this->radio($fieldName, $opts, $options + ['label' => $label]);
            case 'multicheckbox':
                $opts = $options['options'];
                unset($options['options']);

                return $this->multiCheckbox($fieldName, $opts, $options + ['label' => $label]);
            case 'input':
                throw new RuntimeException("Invalid type 'input' used for field '$fieldName'");

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

@param string $fieldName the field name
@param array $options The options for the input element
@return string The generated input element
Generates an input element