You are here

function workflow_create in Workflow 7.2

Same name and namespace in other branches
  1. 5.2 workflow.module \workflow_create()
  2. 5 workflow.module \workflow_create()
  3. 6.2 workflow.module \workflow_create()
  4. 6 workflow.module \workflow_create()
4 calls to workflow_create()
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_test_entity1 in ./workflow.test.inc
_workflow_test_entity_allowable in ./workflow.test.inc
_workflow_test_entity_workflow_crud in ./workflow.test.inc
Test functions.

File

./workflow.entity.inc, line 492
Integrates workflow with entity API.

Code

function workflow_create($name) {

  // @todo: avoid double names in db-table, to get rid of this line of code.
  $workflow = workflow_load_by_name($name);
  if (!$workflow) {
    $workflow = entity_create('Workflow', array(
      'name' => $name,
    ));
  }
  return $workflow;
}