function _addanother_get_node_from_form_state in Add Another 7.2
Internal helper function to get the node from a $form_state.
2 calls to _addanother_get_node_from_form_state()
- addanother_node_form_message_submit in ./
addanother.module - Form submit handler for node_form() considering the 'message'.
- addanother_node_form_submit in ./
addanother.module - Form submit handler for node_form().
File
- ./
addanother.module, line 233 - The main file for the addanother module.
Code
function _addanother_get_node_from_form_state(&$form_state) {
// Check the node is in the form state - if it isn't, something has gone very
// wrong... Best not to continue.
if (!isset($form_state['node'])) {
return FALSE;
}
// Return the node.
return $form_state['node'];
}