function workflow_notify_workflow in Workflow 7.2
Same name and namespace in other branches
- 7 workflow_notify/workflow_notify.module \workflow_notify_workflow()
Implements hook_workflow(). Calls drupal_mail via _workflow_notify() for Workflow Field;
Parameters
$op: The current workflow operation: 'transition permitted', 'transition pre', or 'transition post'.
$old_state: The state ID of the current state.
$new_state: The state ID of the new state.
$node: The node whose workflow state is changing.
$force: The caller indicated that the transition should be forced. (bool). This is only available on the "pre" and "post" calls.
File
- workflow_notify/
workflow_notify.module, line 123 - Notify roles for Workflow state transitions.
Code
function workflow_notify_workflow($op, $old_state, $new_state, $entity, $force, $entity_type = '', $field_name = '', $transition = NULL, $user = NULL) {
global $user;
switch ($op) {
// React to a transition after it's done.
case 'transition post':
// This is only called for Workfow Node. For Workflow Field, see workflow_entity_entity_update().
_workflow_notify($new_state, $entity, $entity_type, $field_name, $transition, $user);
return;
}
}