You are here

workflowfield.module in Workflow 7

Same filename and directory in other branches
  1. 7.2 workflow_field/workflowfield.module

Support workflows made up of arbitrary states.

File

workflow_field/workflowfield.module
View source
<?php

/**
 * @file
 * Support workflows made up of arbitrary states.
 */

// The name of the Workfow form and function, to be used in various callbacks.
define('WORKFLOWFIELD_FORM', 'workflowfield_field_widget_form');

// The definition of the Field_info property type. Shared between 'workflow_field' and 'workflow_rules'.
define('WORKFLOW_FIELD_PROPERTY_TYPE', 'text');

// 'list', 'text' or 'workflow'?
module_load_include('inc', 'workflowfield', 'workflowfield.field');
module_load_include('inc', 'workflowfield', 'workflowfield.widget');
module_load_include('inc', 'workflowfield', 'workflowfield.formatter');

/**
 * Implements hook_forms().
 *
 * Allows the workflow form to be repeated multiple times on a page.
 * See http://drupal.org/node/1970846.
 * 
 * This is called by the formatter, to show the widget.
 *
 */
function workflowfield_forms($form_id, $args) {
  $forms = array();
  if (strpos($form_id, WORKFLOWFIELD_FORM) !== FALSE) {
    $forms[$form_id] = array(
      'callback' => WORKFLOWFIELD_FORM,
    );
  }
  return $forms;
}

Functions

Namesort descending Description
workflowfield_forms Implements hook_forms().

Constants