public function WorkflowTransition::__construct in State Machine 8
Constructs a new WorkflowTransition object.
Parameters
string $id: The transition ID.
string $label: The transition label.
\Drupal\state_machine\Plugin\Workflow\WorkflowState[] $from_states: The "from" states.
\Drupal\state_machine\Plugin\Workflow\WorkflowState $to_state: The "to" state.
File
- src/
Plugin/ Workflow/ WorkflowTransition.php, line 50
Class
- WorkflowTransition
- Defines the class for workflow transitions.
Namespace
Drupal\state_machine\Plugin\WorkflowCode
public function __construct($id, $label, array $from_states, WorkflowState $to_state) {
$this->id = $id;
$this->label = $label;
$this->fromStates = $from_states;
$this->toState = $to_state;
}