function notifications_manage_subscriptions_form_submit in Notifications 6.4
Same name and namespace in other branches
- 6 notifications.manage.inc \notifications_manage_subscriptions_form_submit()
- 6.2 notifications.manage.inc \notifications_manage_subscriptions_form_submit()
- 6.3 notifications.manage.inc \notifications_manage_subscriptions_form_submit()
- 7 notifications.manage.inc \notifications_manage_subscriptions_form_submit()
Handle manage form submissions, run batch operations
2 string references to 'notifications_manage_subscriptions_form_submit'
- notifications_destination_manage_subscriptions_form_options in includes/
destination.inc - Form options
- notifications_manage_subscriptions_form_options in ./
notifications.manage.inc - Form options
File
- ./
notifications.manage.inc, line 161 - Common functions for bulk management of subscriptions
Code
function notifications_manage_subscriptions_form_submit($form, &$form_state) {
$operations = notifications_subscriptions_operations();
$operation = $operations[$form_state['values']['operation']];
// Filter out unchecked subscriptions
$items = array_filter($form_state['values']['subscriptions']);
if ($function = $operation['callback']) {
// Add in callback arguments if present.
if (isset($operation['callback arguments'])) {
$args = array_merge(array(
$items,
), $operation['callback arguments']);
}
else {
$args = array(
$items,
);
}
call_user_func_array($function, $args);
}
else {
// We need to rebuild the form to go to a second step. For example, to
// show the confirmation form for the deletion of subscriptions.
$form_state['rebuild'] = TRUE;
}
}