workflow_admin_ui.api.php 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. /**
  3. * @file
  4. * Hooks provided by the workflow_admin_ui module.
  5. */
  6. /**
  7. * Implements hook_workflow_operations().
  8. *
  9. * @param $op
  10. * 'top_actions': Allow modules to insert their own front page action links.
  11. * 'operations': Allow modules to insert their own workflow operations.
  12. * 'state': Allow modules to insert state operations.
  13. * @param $workflow
  14. * The current workflow object.
  15. * @param $state
  16. * The current state object.
  17. */
  18. function hook_workflow($op, object $workflow, object $state) {
  19. switch ($op) {
  20. case 'top_actions':
  21. $actions = array();
  22. // The workflow_admin_ui module creates links to add a new state,
  23. // and reach each workflow.
  24. // Your module may add to these actions.
  25. return $actions;
  26. case 'operations':
  27. $actions = array();
  28. // The workflow_admin_ui module creates links to add a new state,
  29. // edit the workflow, and delete the workflow.
  30. // Your module may add to these actions.
  31. return $actions;
  32. case 'state':
  33. $ops = array();
  34. // The workflow_admin_ui module does not use this.
  35. // Your module may add operations.
  36. return $ops;
  37. }
  38. }