You are here

function workflow_extensions_forms in Workflow Extensions 7

Same name and namespace in other branches
  1. 6 workflow_extensions.module \workflow_extensions_forms()

Implements hook_forms().

Called as a result of the fact that there are no form handlers for the unique form_id's generated in workflow_extensions_change_state_form(). Here we map these form_id's back to the same 'workflow_tab_form'. This allows us to have multiple copies of the same form on the same page. Note: first of the args is typically the node object.

File

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

Code

function workflow_extensions_forms($form_id, $args) {
  if (function_exists('workflow_forms')) {
    return array();
  }
  if (strpos($form_id, 'workflow_tab_form_nid') === 0) {
    $form = array(
      $form_id => array(
        'callback' => 'workflow_tab_form',
        'callback arguments' => array(),
      ),
    );
    return $form;
  }
}