function PredefinedStatesWorkflowTestType::getStates
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::getStates()
- 8.9.x core/modules/workflows/tests/modules/workflow_type_test/src/Plugin/WorkflowType/PredefinedStatesWorkflowTestType.php \Drupal\workflow_type_test\Plugin\WorkflowType\PredefinedStatesWorkflowTestType::getStates()
- 10 core/modules/workflows/tests/modules/workflow_type_test/src/Plugin/WorkflowType/PredefinedStatesWorkflowTestType.php \Drupal\workflow_type_test\Plugin\WorkflowType\PredefinedStatesWorkflowTestType::getStates()
Overrides WorkflowTypeBase::getStates
2 calls to PredefinedStatesWorkflowTestType::getStates()
- PredefinedStatesWorkflowTestType::getState in core/
modules/ workflows/ tests/ modules/ workflow_type_test/ src/ Plugin/ WorkflowType/ PredefinedStatesWorkflowTestType.php - Gets a workflow state.
- PredefinedStatesWorkflowTestType::hasState in core/
modules/ workflows/ tests/ modules/ workflow_type_test/ src/ Plugin/ WorkflowType/ PredefinedStatesWorkflowTestType.php - Determines if the workflow has a state with the provided ID.
File
-
core/
modules/ workflows/ tests/ modules/ workflow_type_test/ src/ Plugin/ WorkflowType/ PredefinedStatesWorkflowTestType.php, line 30
Class
- PredefinedStatesWorkflowTestType
- Test workflow type.
Namespace
Drupal\workflow_type_test\Plugin\WorkflowTypeCode
public function getStates($state_ids = NULL) {
return array_filter([
'pay_blinds' => new State($this, 'pay_blinds', 'Pay Blinds'),
'bet' => new State($this, 'bet', 'Bet'),
'raise' => new State($this, 'raise', 'Raise'),
'fold' => new State($this, 'fold', 'Fold'),
], function ($state) use ($state_ids) {
return is_array($state_ids) ? in_array($state->id(), $state_ids) : TRUE;
});
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.