function workflow_load in Workflow 7.2
Same name and namespace in other branches
- 6.2 workflow.module \workflow_load()
- 6 workflow.module \workflow_load()
- 7 workflow.module \workflow_load()
Entity loader for Workflow.
Also used as Menu wild card loader {wildcard_name}_load for '%workflow'.
@todo D8: deprecated in favour of workflow_load_single(), not needed for menu.
$id can be numeric ID ('wid') or machine name ('name'). Caveat: this only works for entities with EntityAPIControllerExportable. #1741956
See also
http://www.phpgainers.com/content/creating-menu-wildcard-loader-function...
7 calls to workflow_load()
- WorkflowController::delete in includes/
Entity/ Workflow.php - Overridden to care about reverted entities.
- WorkflowTransition::getWorkflow in includes/
Entity/ WorkflowTransition.php - Get the Transitions $workflow.
- workflow_vbo_given_state_action_form in workflow_vbo/
actions/ given.action.inc - Configuration form for "Change workflow state of post to new state" action.
- _workflow_info_fields in ./
workflow.module - Gets the workflow field names, if not known already.
- _workflow_test_entity1 in ./
workflow.test.inc
1 string reference to 'workflow_load'
- workflow_admin_ui_edit_form in workflow_admin_ui/
workflow_admin_ui.page.workflow.inc - Menu callback. Edit a workflow's properties.
File
- ./
workflow.entity.inc, line 467 - Integrates workflow with entity API.
Code
function workflow_load($id) {
// Some Admin UI menu page loaders pass the $wid as string, not int.
// @see workflow_admin_ui_edit_form_validate().
$workflow = entity_load_single('Workflow', $id);
return $workflow;
}