function hook_workflow in Workflow 7
Same name in this branch
- 7 workflow.api.php \hook_workflow()
- 7 workflow_admin_ui/workflow_admin_ui.api.php \hook_workflow()
Same name and namespace in other branches
- 8 workflow.api.php \hook_workflow()
- 7.2 workflow.api.php \hook_workflow()
Implements hook_workflow_operations().
Parameters
$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.
$workflow: The current workflow object.
$state: The current state object.
4 functions implement hook_workflow()
Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.
- workflow_access_workflow in workflow_access/
workflow_access.workflow.inc - Implements hook_workflow().
- workflow_actions_workflow in workflow_actions/
workflow_actions.module - Implements hook_workflow().
- workflow_notify_workflow in workflow_notify/
workflow_notify.module - Implements hook_workflow().
- workflow_rules_workflow in workflow_rules/
workflow_rules.workflow.inc - Implements hook_workflow(). Invokes events, as defined in hook_rules_event_info().
7 invocations of hook_workflow()
- Workflow::delete in includes/
Entity/ Workflow.php - Given a wid, delete the workflow and its data.
- WorkflowState::deactivate in includes/
Entity/ WorkflowState.php - Deactivate a Workflow State, moving existing nodes to a given State.
- WorkflowState::getOptions in includes/
Entity/ WorkflowState.php - Returns the allowed values for the current state.
- WorkflowTransition::execute in includes/
Entity/ WorkflowTransition.php - Execute a transition (change state of a node). @deprecated: workflow_execute_transition() --> WorkflowTransition::execute().
- workflow_delete_workflow_transitions_by_tid in ./
workflow.module - Given a tid, delete the transition.
File
- workflow_admin_ui/
workflow_admin_ui.api.php, line 19 - Hooks provided by the workflow_admin_ui module.
Code
function hook_workflow($op, object $workflow, object $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 'state':
$ops = array();
// The workflow_admin_ui module does not use this.
// Your module may add operations.
return $ops;
}
}