You are here

public function WorkflowTypeBase::deleteTransition in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/workflows/src/Plugin/WorkflowTypeBase.php \Drupal\workflows\Plugin\WorkflowTypeBase::deleteTransition()
  2. 9 core/modules/workflows/src/Plugin/WorkflowTypeBase.php \Drupal\workflows\Plugin\WorkflowTypeBase::deleteTransition()

File

core/modules/workflows/src/Plugin/WorkflowTypeBase.php, line 440

Class

WorkflowTypeBase
A base class for Workflow type plugins.

Namespace

Drupal\workflows\Plugin

Code

public function deleteTransition($transition_id) {
  if (!$this
    ->hasTransition($transition_id)) {
    throw new \InvalidArgumentException("The transition '{$transition_id}' does not exist in workflow.");
  }
  unset($this->configuration['transitions'][$transition_id]);
  return $this;
}