public function PredefinedStatesWorkflowTestType::deleteState in Drupal 9
Same name and namespace in other branches
- 8 core/modules/workflows/tests/modules/workflow_type_test/src/Plugin/WorkflowType/PredefinedStatesWorkflowTestType.php \Drupal\workflow_type_test\Plugin\WorkflowType\PredefinedStatesWorkflowTestType::deleteState()
Deletes a state from the workflow.
Parameters
string $state_id: The state ID to delete.
Return value
$this The workflow type plugin.
Throws
\InvalidArgumentException Thrown if $state_id does not exist.
Overrides WorkflowTypeBase::deleteState
File
- core/
modules/ workflows/ tests/ modules/ workflow_type_test/ src/ Plugin/ WorkflowType/ PredefinedStatesWorkflowTestType.php, line 84
Class
- PredefinedStatesWorkflowTestType
- Test workflow type.
Namespace
Drupal\workflow_type_test\Plugin\WorkflowTypeCode
public function deleteState($state_id) {
// States cannot be deleted on this workflow.
return $this;
}