public function TestType::getRequiredStates in Drupal 9
Same name and namespace in other branches
- 8 core/modules/workflows/tests/modules/workflow_type_test/src/Plugin/WorkflowType/TestType.php \Drupal\workflow_type_test\Plugin\WorkflowType\TestType::getRequiredStates()
Gets the required states of workflow type.
This is usually specified in the workflow type annotation.
Return value
string[] The required states.
Overrides WorkflowTypeBase::getRequiredStates
See also
\Drupal\workflows\Annotation\WorkflowType
File
- core/
modules/ workflows/ tests/ modules/ workflow_type_test/ src/ Plugin/ WorkflowType/ TestType.php, line 20
Class
- TestType
- Test workflow type.
Namespace
Drupal\workflow_type_test\Plugin\WorkflowTypeCode
public function getRequiredStates() {
// Normally this is obtained from the annotation but we get from state to
// allow dynamic testing.
return \Drupal::state()
->get('workflow_type_test.required_states', []);
}