private static function mapFieldType($type, $name = null)
    {
        $types = array(
            'TextField' => 'UserTextField',
            'EmailField' => 'UserEmailField',
            'CheckboxField' => 'UserCheckboxField',
            'OptionsetField' => 'UserOptionSetField'
        );

        $currentDefaults = Attendee::config()->get('default_fields');
        if ($currentDefaults && key_exists($name, $currentDefaults)) {
            return $currentDefaults[$name]['FieldType'];
        } else {
            return $types[$type];
        }

    }
private static function mapFieldType($type, $name = null)
    {
        $types = array(
            'TextField' => 'UserTextField',
            'EmailField' => 'UserEmailField',
            'CheckboxField' => 'UserCheckboxField',
            'OptionsetField' => 'UserOptionSetField'
        );

        $currentDefaults = Attendee::config()->get('default_fields');
        if ($currentDefaults && key_exists($name, $currentDefaults)) {
            return $currentDefaults[$name]['FieldType'];
        } else {
            return $types[$type];
        }

    }
private static function mapFieldType ( $ type , $ name = null ) { $ types = array ( 'TextField' => 'UserTextField' , 'EmailField' => 'UserEmailField' , 'CheckboxField' => 'UserCheckboxField' , 'OptionsetField' => 'UserOptionSetField' ) ; $ currentDefaults = Attendee :: config ( ) -> get ( 'default_fields' ) ; if ( $ currentDefaults && key_exists ( $ name , $ currentDefaults ) ) { return $ currentDefaults [ $ name ] [ 'FieldType' ] ; } else { return $ types [ $ type ] ; } }
Map the given field type to one of the available class names
Also looks into the current mapping if the field has a new type

@param      $type
@param null $name

@return string
Map the given field type to one of the available class names Also looks into the current mapping if the field has a new type