You are here

function workflow_extensions_block in Workflow Extensions 6

Implementation of hook_block().

File

./workflow_extensions.module, line 382
UI-related improvements to the Workflow module and tokens for Rules.

Code

function workflow_extensions_block($op = 'list', $delta = 0) {
  if (!module_exists('workflow')) {
    return;
  }
  if ($op == 'list') {
    $block[0]['info'] = t('Workflow state change form');
    return $block;
  }
  elseif ($op == 'view' && arg(0) == 'node') {
    $node = node_load(arg(1));
    $block['content'] = workflow_extensions_change_state_form($node);
    $block['subject'] = '';
    return $block;
  }
}