A very generic Views Wizard class - can be constructed for any base table.
Code
protectedfunctiondefault_display_sorts($form, $form_state) {
$sorts = array();
// Add any sorts provided by the plugin.
if (isset($this->plugin['sorts'])) {
foreach ($this->plugin['sorts'] as$name => $info) {
$sorts[$name] = $info;
}
}
// Add any sorts specified by the user when filling out the wizard.
$sorts = array_merge($sorts, $this->default_display_sorts_user($form, $form_state));
return$sorts;
}