function state_flow_admin_nodes_submit in State Machine 7.3
Same name and namespace in other branches
- 7.2 modules/state_flow/state_flow.admin.inc \state_flow_admin_nodes_submit()
Process node_admin_nodes form submissions.
Execute the chosen 'Update option' on the selected nodes.
1 string reference to 'state_flow_admin_nodes_submit'
- state_flow_admin_nodes in modules/
state_flow/ state_flow.admin.inc - Form builder: Builds the node administration overview.
File
- modules/
state_flow/ state_flow.admin.inc, line 267 - Revision Content administration.
Code
function state_flow_admin_nodes_submit($form, &$form_state) {
$operations = module_invoke_all('node_revision_operations');
drupal_alter('state_flow_node_revision_operations', $operations);
$operation = $operations[$form_state['values']['operation']];
// Filter out unchecked nodes
$keys = array_filter($form_state['values']['nodes']);
$keys = array_map('_state_flow_split_keys', $keys);
if ($function = $operation['callback']) {
// Add in callback arguments if present.
if (isset($operation['callback arguments'])) {
$args = array_merge(array(
$keys,
), $operation['callback arguments']);
}
else {
$args = array(
$keys,
);
}
call_user_func_array($function, $args);
cache_clear_all();
}
else {
// We need to rebuild the form to go to a second step. For example, to
// show the confirmation form for the deletion of nodes.
$form_state['rebuild'] = TRUE;
}
}