You are here

function workflow_execute_transition in Workflow 8

Same name and namespace in other branches
  1. 5.2 workflow.module \workflow_execute_transition()
  2. 5 workflow.module \workflow_execute_transition()
  3. 6.2 workflow.module \workflow_execute_transition()
  4. 6 workflow.module \workflow_execute_transition()
  5. 7.2 workflow.module \workflow_execute_transition()
  6. 7 workflow.module \workflow_execute_transition()

Parameters

\Drupal\workflow\Entity\WorkflowTransitionInterface $transition: A WorkflowTransition.

bool $force: Indicator if the transition must be forces.

Return value

string A string.

3 calls to workflow_execute_transition()
WorkflowNodeGivenStateAction::execute in src/Plugin/Action/WorkflowNodeGivenStateAction.php
Executes the plugin.
WorkflowNodeNextStateAction::execute in src/Plugin/Action/WorkflowNodeNextStateAction.php
Executes the plugin.
WorkflowTransitionRevertForm::submitForm in src/Form/WorkflowTransitionRevertForm.php
This is the default entity object builder function. It is called before any other submit handler to build the new entity object to be used by the following submit handlers. At this point of the form workflow the entity is validated and the form state…

File

./workflow.module, line 287
Support workflows made up of arbitrary states.

Code

function workflow_execute_transition(WorkflowTransitionInterface $transition, $force = FALSE) {

  // Execute transition and update the attached entity.
  return $transition
    ->executeAndUpdateEntity($force);
}