You are here

public function WorkflowConfigTransition::setValues in Workflow 8

Helper function for __construct.

Used for WorkflowTransition ánd WorkflowScheduledTransition.

File

src/Entity/WorkflowConfigTransition.php, line 95

Class

WorkflowConfigTransition
Workflow configuration entity to persistently store configuration.

Namespace

Drupal\workflow\Entity

Code

public function setValues() {
  $state = WorkflowState::load($this->to_sid ? $this->to_sid : $this->from_sid);
  if ($state) {
    $this
      ->setWorkflow($state
      ->getWorkflow());
  }
}