function PredefinedStatesWorkflowTestType::getState
Same name in other branches
- 9 core/modules/workflows/tests/modules/workflow_type_test/src/Plugin/WorkflowType/PredefinedStatesWorkflowTestType.php \Drupal\workflow_type_test\Plugin\WorkflowType\PredefinedStatesWorkflowTestType::getState()
- 8.9.x core/modules/workflows/tests/modules/workflow_type_test/src/Plugin/WorkflowType/PredefinedStatesWorkflowTestType.php \Drupal\workflow_type_test\Plugin\WorkflowType\PredefinedStatesWorkflowTestType::getState()
- 10 core/modules/workflows/tests/modules/workflow_type_test/src/Plugin/WorkflowType/PredefinedStatesWorkflowTestType.php \Drupal\workflow_type_test\Plugin\WorkflowType\PredefinedStatesWorkflowTestType::getState()
Overrides WorkflowTypeBase::getState
File
-
core/
modules/ workflows/ tests/ modules/ workflow_type_test/ src/ Plugin/ WorkflowType/ PredefinedStatesWorkflowTestType.php, line 44
Class
- PredefinedStatesWorkflowTestType
- Test workflow type.
Namespace
Drupal\workflow_type_test\Plugin\WorkflowTypeCode
public function getState($state_id) {
$states = $this->getStates();
if (!isset($states[$state_id])) {
throw new \InvalidArgumentException("The state '{$state_id}' does not exist in workflow.'");
}
return $states[$state_id];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.