The Workflow admin page (admin/build/workflow) displays a list of operations in front of each workflow and of each state. Currently this list is fixed to {Add state, Actions, Edit, Delete} for workflows and {Edit, Delete} for states. Third-party modules that extend the capabilities of the Workflow module might need to perform additional operations on these elements. For example, my workflow_graph module adds a "Graph" operation to workflows. My workflow_fields module adds an "Edit" operation to the (creation) state. The present patch allows these additions to be made in a generic fashion.
The patch modifies workflow_overview() by calling a new hook_workflow_operations($wid,$sid=0) when building the links for the workflows and for the states. Interested modules just return an array of links, in the format specified in workflow_overview(). These additional links are simply merged with the ones created inside the function.
| Comment | File | Size | Author |
|---|---|---|---|
| workflow_operations.patch | 1.11 KB | infojunkie |
Comments
Comment #1
infojunkiePatch also works for 1.2.
Comment #2
mshaver commentedThis is an important patch that should be included in the core workflow.module. I use it specifically with the workflow_fields.module to modify the creation state during workflows.
Comment #3
infojunkiePatch also works for 2.2.
Comment #4
jvandyk commentedApplied a simplified version of this patch. module_invoke_all() returns an array, so no need to check for that.
Comment #5
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.