You are here

public function WorkflowTypeInterface::getStates in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/workflows/src/WorkflowTypeInterface.php \Drupal\workflows\WorkflowTypeInterface::getStates()

Gets state objects for the provided state IDs.

Parameters

string[] $state_ids: A list of state IDs to get. If NULL then all states will be returned.

Return value

\Drupal\workflows\StateInterface[] An array of workflow states, keyed by state IDs.

Throws

\InvalidArgumentException Thrown if $state_ids contains a state ID that does not exist.

1 method overrides WorkflowTypeInterface::getStates()
WorkflowTypeBase::getStates in core/modules/workflows/src/Plugin/WorkflowTypeBase.php
Gets state objects for the provided state IDs.

File

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

Class

WorkflowTypeInterface
An interface for Workflow type plugins.

Namespace

Drupal\workflows

Code

public function getStates($state_ids = NULL);