function WorkflowTypeBase::getStates
Same name in other branches
- 9 core/modules/workflows/src/Plugin/WorkflowTypeBase.php \Drupal\workflows\Plugin\WorkflowTypeBase::getStates()
- 8.9.x core/modules/workflows/src/Plugin/WorkflowTypeBase.php \Drupal\workflows\Plugin\WorkflowTypeBase::getStates()
- 11.x core/modules/workflows/src/Plugin/WorkflowTypeBase.php \Drupal\workflows\Plugin\WorkflowTypeBase::getStates()
Overrides WorkflowTypeInterface::getStates
1 call to WorkflowTypeBase::getStates()
- WorkflowTypeBase::getInitialState in core/
modules/ workflows/ src/ Plugin/ WorkflowTypeBase.php - Gets the initial state for the workflow.
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);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.