protected function getMagentoType(array $field)
    {
        switch ($field['type']) {
            case 'email':
            case 'number':
                $type = 'text';
                break;
            case 'markup':
                $type = 'note';
                break;
            case 'radio':
                $type = 'radios';
                break;
            case 'checkbox':
                $type = 'checkboxes';
                break;
            case 'select':
                $type = empty($field['attributes']['multiple']) ? 'select' : 'multiselect';
                break;
            case 'details':
                $type = 'fieldset';
                break;
            // Other types are returned as is: fieldset, text, password, date
            default:
                $type = $field['type'];
                break;
        }
        return $type;
    }