function party_attached_entity_action_form_submit in Party 8.2
Same name and namespace in other branches
- 7 party.pages.inc \party_attached_entity_action_form_submit()
Submit handler for the general action form.
1 string reference to 'party_attached_entity_action_form_submit'
- party_attached_entity_action_form in ./
party.pages.inc - Form builder for a generalized attached entity action.
File
- ./
party.pages.inc, line 274 - party.pages.inc
Code
function party_attached_entity_action_form_submit($form, &$form_state) {
// Retrieve the original form parameters from the build info.
// Minor WTF: because $eid is optional, it doesn't show in the array. Shove it
// in there as NULL if missing, so controller handlers can rely on it.
if (!isset($form_state['build_info']['args'][3])) {
$form_state['build_info']['args'][3] = NULL;
}
list($party, $data_set, $action, $eid) = $form_state['build_info']['args'];
// Call the submit handler in the action controller.
$action_controller = new $data_set['actions'][$action]['controller']();
$action_controller
->action_form_submit($form, $form_state, $party, $data_set, $eid);
// Redirect to the set piece.
$form_state['redirect'] = 'party/' . $party->pid . '/' . $data_set['path element'];
}