function workflow_extensions_block_view in Workflow Extensions 7
Implements hook_block_view().
File
- ./
workflow_extensions.module, line 419 - UI-related improvements to the Workflow module and tokens for Rules.
Code
function workflow_extensions_block_view($delta) {
if (arg(0) == 'node') {
$node = node_load(arg(1));
$block['content'] = workflow_extensions_change_state_form($node);
if ($block['content']) {
$workflow = workflow_get_workflow_type_map_by_type($node->type);
$workflow = workflow_get_workflows_by_wid($workflow->wid);
$block['subject'] = t('Current state: @state', array(
'@state' => $node->workflow_state_name,
));
}
return $block;
}
}