You are here

public function Workflow::getState in State Machine 8

Gets a workflow state with the given ID.

Parameters

string $id: The state ID.

Return value

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

Overrides WorkflowInterface::getState

File

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

Class

Workflow
Defines the class for workflows.

Namespace

Drupal\state_machine\Plugin\Workflow

Code

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