workflow_cleanup.module 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <?php
  2. /**
  3. * @file
  4. * Cleans up Workflow cruft that may build up over time.
  5. */
  6. /**
  7. * Implements hook_menu().
  8. */
  9. function workflow_cleanup_menu() {
  10. $items = array();
  11. $items['admin/config/workflow/workflow/cleanup'] = array(
  12. 'title' => 'Clean up workflow',
  13. 'file' => 'workflow_cleanup.pages.inc',
  14. 'access arguments' => array('administer workflow'),
  15. 'page callback' => 'drupal_get_form',
  16. 'page arguments' => array('workflow_cleanup_form'),
  17. 'type' => MENU_LOCAL_ACTION,
  18. );
  19. return $items;
  20. }
  21. /**
  22. * Implements hook_help().
  23. */
  24. function workflow_cleanup_help($path, $arg) {
  25. switch ($path) {
  26. case 'admin/config/workflow/workflow/cleanup':
  27. return t('This page allows you to delete orphaned and inactive states.
  28. States can be deleted freely in a development environment, but be
  29. careful if you have used a State in a production environment. The
  30. transition history of your content will loose the description of a
  31. previously used state. If your Workflow must comply to some auditing
  32. standards, you should NOT use this function.');
  33. }
  34. }
  35. /**
  36. * Implements hook_theme().
  37. */
  38. function workflow_cleanup_theme() {
  39. return array(
  40. 'workflow_cleanup_form' => array('render element' => 'form'),
  41. );
  42. }