You are here

public function Workflow::getTransitionsByStateId in Workflow 8

Get a specific transition.

Parameters

string $from_sid:

string $to_sid:

Return value

\Drupal\workflow\Entity\WorkflowConfigTransition[]

Overrides WorkflowInterface::getTransitionsByStateId

2 calls to Workflow::getTransitionsByStateId()
Workflow::createTransition in src/Entity/Workflow.php
Creates a Transition for this workflow.
Workflow::isValid in src/Entity/Workflow.php
Validate the workflow. Generate a message if not correct.

File

src/Entity/Workflow.php, line 476

Class

Workflow
Workflow configuration entity to persistently store configuration.

Namespace

Drupal\workflow\Entity

Code

public function getTransitionsByStateId($from_sid, $to_sid) {
  $conditions = [
    'from_sid' => $from_sid,
    'to_sid' => $to_sid,
  ];
  return $this
    ->getTransitions(NULL, $conditions);
}