public function WorkflowTypeBase::getStates in Drupal 10
Same name and namespace in other branches
- 8 core/modules/workflows/src/Plugin/WorkflowTypeBase.php \Drupal\workflows\Plugin\WorkflowTypeBase::getStates()
- 9 core/modules/workflows/src/Plugin/WorkflowTypeBase.php \Drupal\workflows\Plugin\WorkflowTypeBase::getStates()
1 method overrides WorkflowTypeBase::getStates()
- PredefinedStatesWorkflowTestType::getStates in core/
modules/ workflows/ tests/ modules/ workflow_type_test/ src/ Plugin/ WorkflowType/ PredefinedStatesWorkflowTestType.php - Gets state objects for the provided state IDs.
File
- core/
modules/ workflows/ src/ Plugin/ WorkflowTypeBase.php, line 141
Class
- WorkflowTypeBase
- A base class for Workflow type plugins.
Namespace
Drupal\workflows\PluginCode
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);
}