function Transition::__construct

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

Transition constructor.

Parameters

\Drupal\workflows\WorkflowTypeInterface $workflow: The workflow the state is attached to.

string $id: The transition's ID.

string $label: The transition's label.

array $fromStateIds: A list of from state IDs.

string $toStateId: The to state ID.

int $weight: (optional) The transition's weight. Defaults to 0.

File

core/modules/workflows/src/Transition.php, line 26

Class

Transition
A transition value object that describes the transition between states.

Namespace

Drupal\workflows

Code

public function __construct(protected WorkflowTypeInterface $workflow, protected $id, protected $label, protected array $fromStateIds, protected $toStateId, protected $weight = 0) {
}

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