function WorkflowTypeInterface::setTransitionWeight

Same name and namespace in other branches
  1. 9 core/modules/workflows/src/WorkflowTypeInterface.php \Drupal\workflows\WorkflowTypeInterface::setTransitionWeight()
  2. 8.9.x core/modules/workflows/src/WorkflowTypeInterface.php \Drupal\workflows\WorkflowTypeInterface::setTransitionWeight()
  3. 10 core/modules/workflows/src/WorkflowTypeInterface.php \Drupal\workflows\WorkflowTypeInterface::setTransitionWeight()

Sets a transition's weight.

Parameters

string $transition_id: The transition ID.

int $weight: The transition's weight.

Return value

$this

Throws

\InvalidArgumentException Thrown if the transition does not exist.

1 method overrides WorkflowTypeInterface::setTransitionWeight()
WorkflowTypeBase::setTransitionWeight in core/modules/workflows/src/Plugin/WorkflowTypeBase.php
Sets a transition's weight.

File

core/modules/workflows/src/WorkflowTypeInterface.php, line 322

Class

WorkflowTypeInterface
An interface for Workflow type plugins.

Namespace

Drupal\workflows

Code

public function setTransitionWeight($transition_id, $weight);

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.