You are here

workflow_admin_ui.api.php in Workflow 7.2

Same filename and directory in other branches
  1. 7 workflow_admin_ui/workflow_admin_ui.api.php

Hooks provided by the workflow_admin_ui module.

File

workflow_admin_ui/workflow_admin_ui.api.php
View source
<?php

/**
 * @file
 * Hooks provided by the workflow_admin_ui module.
 */

/**
 * Implements hook_workflow_operations().
 *
 * Menu callback; adds links on EntityWorkflowUIController::overviewForm.
 *
 * @param string $op
 *   'top_actions': Allow modules to insert their own front page action links.
 *   'operations': Allow modules to insert their own workflow operations.
 *   'state':  Allow modules to insert state operations.
 * @param Workflow $workflow
 *   The current workflow object.
 * @param WorkflowState $state
 *   The current state object.
 *
 * @return array
 */
function hook_workflow_operations($op, Workflow $workflow, WorkflowState $state) {
  switch ($op) {
    case 'top_actions':
      $actions = array();

      // The workflow_admin_ui module creates links to add a new state,
      // and reach each workflow.
      // Your module may add to these actions.
      return $actions;
    case 'operations':
      $actions = array();

      // The workflow_admin_ui module creates links to add a new state,
      // edit the workflow, and delete the workflow.
      // Your module may add to these actions.
      return $actions;
    case 'workflow':
      $actions = array();

      // Allow modules to insert their own workflow operations.
      return $actions;
    case 'state':
      $ops = array();

      // The workflow_admin_ui module does not use this.
      // Your module may add operations.
      return $ops;
  }
}

Functions