function group_member_options_form_submit in Group 7
Options form submit callback.
1 string reference to 'group_member_options_form_submit'
- group_member_options_form in admin/
group_membership.inc - Builds the group member administration options.
File
- admin/
group_membership.inc, line 205 - Group membership overview admin UI.
Code
function group_member_options_form_submit($form, &$form_state) {
$operations = module_invoke_all('group_member_operations', $form_state['build_info']['args'][0]);
$operation = $operations[$form_state['values']['operation']];
// Get all selected memberships.
$mids = array_filter($form_state['values']['members']);
// Build the arguments for the operation callback.
$args = array(
$mids,
);
if (isset($operation['callback arguments'])) {
$args = array_merge($args, $operation['callback arguments']);
}
if (empty($operation['form callback'])) {
call_user_func_array($operation['callback'], $args);
}
else {
// Pass the operation form details.
$form_state['rebuild_info']['callback'] = $operation['callback'];
$form_state['rebuild_info']['args'] = $args;
// We need to rebuild the form to be able to show the operation form.
$form_state['rebuild'] = TRUE;
}
}