function WorkflowTypeInterface::getState

Same name in other branches
  1. 8.9.x core/modules/workflows/src/WorkflowTypeInterface.php \Drupal\workflows\WorkflowTypeInterface::getState()
  2. 10 core/modules/workflows/src/WorkflowTypeInterface.php \Drupal\workflows\WorkflowTypeInterface::getState()
  3. 11.x core/modules/workflows/src/WorkflowTypeInterface.php \Drupal\workflows\WorkflowTypeInterface::getState()

Gets a workflow state.

Parameters

string $state_id: The state's ID.

Return value

\Drupal\workflows\StateInterface The workflow state.

Throws

\InvalidArgumentException Thrown if $state_id does not exist.

1 method overrides WorkflowTypeInterface::getState()
WorkflowTypeBase::getState in core/modules/workflows/src/Plugin/WorkflowTypeBase.php
Gets a workflow state.

File

core/modules/workflows/src/WorkflowTypeInterface.php, line 147

Class

WorkflowTypeInterface
An interface for Workflow type plugins.

Namespace

Drupal\workflows

Code

public function getState($state_id);

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.