Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Transition.php

function 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\workflows

Code

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;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal