You are here

public function WorkflowTransition::getWorkflow in Workflow 7.2

Get the Transitions $workflow.

Return value

Workflow|NULL The workflow for this Transition.

4 calls to WorkflowTransition::getWorkflow()
WorkflowTransition::execute in includes/Entity/WorkflowTransition.php
Execute a transition (change state of a node).
WorkflowTransition::isAllowed in includes/Entity/WorkflowTransition.php
Verifies if the given transition is allowed.
WorkflowTransition::setValues in includes/Entity/WorkflowTransition.php
Helper function for __construct. Used for all children of WorkflowTransition (aka WorkflowScheduledTransition)
WorkflowTransition::__construct in includes/Entity/WorkflowTransition.php
Creates a new entity.

File

includes/Entity/WorkflowTransition.php, line 515
Contains workflow\includes\Entity\WorkflowTransition. Contains workflow\includes\Entity\WorkflowTransitionController.

Class

WorkflowTransition
Implements an actual Transition.

Code

public function getWorkflow() {
  $workflow = NULL;
  if (!$this->wid) {
    $state = workflow_state_load_single($this->new_sid ? $this->new_sid : $this->old_sid);
    $this->wid = (int) $state->wid;
  }
  if ($this->wid) {
    $workflow = workflow_load($this->wid);
  }
  return $workflow;
}