public function Transition::__construct in Drupal 8
Same name and namespace in other branches
- 9 core/modules/workflows/src/Transition.php \Drupal\workflows\Transition::__construct()
- 10 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 $from_state_ids: A list of from state IDs.
string $to_state_id: The to state ID.
int $weight: (optional) The transition's weight. Defaults to 0.
File
- core/
modules/ workflows/ src/ Transition.php, line 68
Class
- Transition
- A transition value object that describes the transition between states.
Namespace
Drupal\workflowsCode
public function __construct(WorkflowTypeInterface $workflow, $id, $label, array $from_state_ids, $to_state_id, $weight = 0) {
$this->workflow = $workflow;
$this->id = $id;
$this->label = $label;
$this->fromStateIds = $from_state_ids;
$this->toStateId = $to_state_id;
$this->weight = $weight;
}