/**
* {@inheritdoc}
*/
public function getStates($state_ids = NULL
) { if ($state_ids === NULL
) { $state_ids =
array_keys($this->configuration
['states'
]);
} /** @var \Drupal\workflows\StateInterface[] $states */
$states =
array_combine($state_ids,
array_map([$this, 'getState'
],
$state_ids));
return static::
labelWeightMultisort($states);
} /**
* {@inheritdoc}
*/
public function getState($state_id) { if (!
isset($this->configuration
['states'
][$state_id])) { throw new \
InvalidArgumentException("The state '
$state_id' does not exist in workflow."
);
} return new State( $this,