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

Breadcrumb

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

function State::__construct

Same name in this branch
  1. 11.1.x core/lib/Drupal/Core/State/State.php \Drupal\Core\State\State::__construct()

State constructor.

Parameters

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

string $id: The state's ID.

string $label: The state's label.

int $weight: The state's weight.

File

core/modules/workflows/src/State.php, line 50

Class

State
A value object representing a workflow state.

Namespace

Drupal\workflows

Code

public function __construct(WorkflowTypeInterface $workflow, $id, $label, $weight = 0) {
    $this->workflow = $workflow;
    $this->id = $id;
    $this->label = $label;
    $this->weight = $weight;
}

API Navigation

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