original_string: public static function config_set_edit_form_data(moodleform $editform, array $config) {
          $data = array();
          $data['server'] = $config['server'];
          $data['prefix'] = !empty($config['prefix']) ? $config['prefix'] : '';
          $data['password'] = !empty($config['password']) ? $config['password'] : '';
          if (!empty($config['serializer'])) {
              $data['serializer'] = $config['serializer'];
          }
          $editform->set_data($data);
      }
code: public static function config_set_edit_form_data(moodleform $editform, array $config) {
          $data = array();
          $data['server'] = $config['server'];
          $data['prefix'] = !empty($config['prefix']) ? $config['prefix'] : '';
          $data['password'] = !empty($config['password']) ? $config['password'] : '';
          if (!empty($config['serializer'])) {
              $data['serializer'] = $config['serializer'];
          }
          $editform->set_data($data);
      }
code_tokens: public static function config_set_edit_form_data ( moodleform $ editform , array $ config ) { $ data = array ( ) ; $ data [ 'server' ] = $ config [ 'server' ] ; $ data [ 'prefix' ] = ! empty ( $ config [ 'prefix' ] ) ? $ config [ 'prefix' ] : '' ; $ data [ 'password' ] = ! empty ( $ config [ 'password' ] ) ? $ config [ 'password' ] : '' ; if ( ! empty ( $ config [ 'serializer' ] ) ) { $ data [ 'serializer' ] = $ config [ 'serializer' ] ; } $ editform -> set_data ( $ data ) ; }
docstring: Sets form data from a configuration array.
  
  @see cache_is_configurable
  @param moodleform $editform
  @param array $config
docstring_tokens: Sets form data from a configuration array .