function hook_workflow_comment_alter in Workflow 7.2
Same name and namespace in other branches
- 8 workflow.api.php \hook_workflow_comment_alter()
Implements hook_workflow_comment_alter().
Allow other modules to change the user comment when saving a state change.
Parameters
string $comment: The comment of the current state transition.
array $context: 'transition' - The current transition itself.
1 invocation of hook_workflow_comment_alter()
- WorkflowTransition::execute in includes/
Entity/ WorkflowTransition.php - Execute a transition (change state of a node).
File
- ./
workflow.api.php, line 118 - Hooks provided by the workflow module.
Code
function hook_workflow_comment_alter(&$comment, array &$context) {
$transition = $context->transition;
$comment = $transition->uid . 'says: ' . $comment;
}