You are here

public function Workflow::getTransition in State Machine 8

Gets a workflow transition with the given ID.

Parameters

string $id: The transition ID.

Return value

\Drupal\state_machine\Plugin\Workflow\WorkflowTransition|null The requested transition, or NULL if not found.

Overrides WorkflowInterface::getTransition

File

src/Plugin/Workflow/Workflow.php, line 125

Class

Workflow
Defines the class for workflows.

Namespace

Drupal\state_machine\Plugin\Workflow

Code

public function getTransition($id) {
  return isset($this->transitions[$id]) ? $this->transitions[$id] : NULL;
}