src/View/Helper/FormHelper.php
protected function _parseOptions($fieldName, $options) {

        $needsMagicType = false;
        if (empty($options['type'])) {
            $needsMagicType = true;

            $context = $this->_getContext();
            $internalType = $context->type($fieldName);
            if ($this->isHtml5Render($options) && in_array($internalType, ['date', 'datetime', 'time'])) {
                $options['type'] = $this->_bootstrapTypeMap($internalType);
            } else {
                $options['type'] = $this->_inputType($fieldName, $options);
            }
        } else {
            if ($this->isHtml5Render($options) && in_array($options['type'], ['date', 'datetime', 'time'])) {
                $options['type'] = $this->_bootstrapTypeMap($options['type']);
            }
        }

        $options = $this->_magicOptions($fieldName, $options, $needsMagicType);

        return $options;
    }
protected function _parseOptions($fieldName, $options) {

        $needsMagicType = false;
        if (empty($options['type'])) {
            $needsMagicType = true;

            $context = $this->_getContext();
            $internalType = $context->type($fieldName);
            if ($this->isHtml5Render($options) && in_array($internalType, ['date', 'datetime', 'time'])) {
                $options['type'] = $this->_bootstrapTypeMap($internalType);
            } else {
                $options['type'] = $this->_inputType($fieldName, $options);
            }
        } else {
            if ($this->isHtml5Render($options) && in_array($options['type'], ['date', 'datetime', 'time'])) {
                $options['type'] = $this->_bootstrapTypeMap($options['type']);
            }
        }

        $options = $this->_magicOptions($fieldName, $options, $needsMagicType);

        return $options;
    }
protected function _parseOptions ( $ fieldName , $ options ) { $ needsMagicType = false ; if ( empty ( $ options [ 'type' ] ) ) { $ needsMagicType = true ; $ context = $ this -> _getContext ( ) ; $ internalType = $ context -> type ( $ fieldName ) ; if ( $ this -> isHtml5Render ( $ options ) && in_array ( $ internalType , [ 'date' , 'datetime' , 'time' ] ) ) { $ options [ 'type' ] = $ this -> _bootstrapTypeMap ( $ internalType ) ; } else { $ options [ 'type' ] = $ this -> _inputType ( $ fieldName , $ options ) ; } } else { if ( $ this -> isHtml5Render ( $ options ) && in_array ( $ options [ 'type' ] , [ 'date' , 'datetime' , 'time' ] ) ) { $ options [ 'type' ] = $ this -> _bootstrapTypeMap ( $ options [ 'type' ] ) ; } } $ options = $ this -> _magicOptions ( $ fieldName , $ options , $ needsMagicType ) ; return $ options ; }
In case the type is defined manually by the user we need to map it

@param string $fieldName
@param array  $options

@return array
In case the type is defined manually by the user we need to map it