function WorkflowType::__construct

Same name and namespace in other branches
  1. 10 core/modules/workflows/src/Attribute/WorkflowType.php \Drupal\workflows\Attribute\WorkflowType::__construct()

Constructs an Action attribute.

Parameters

string $id: The plugin ID.

\Drupal\Core\StringTranslation\TranslatableMarkup|null $label: The label of the action.

string[] $forms: A list of optional form classes implementing PluginFormInterface.

string[] $required_states: States required to exist.

Overrides Plugin::__construct

File

core/modules/workflows/src/Attribute/WorkflowType.php, line 61

Class

WorkflowType
Defines a Workflow type attribute object.

Namespace

Drupal\workflows\Attribute

Code

public function __construct(string $id, ?TranslatableMarkup $label = NULL, array $forms = [], array $required_states = []) {
    $this->forms = $forms;
    $this->required_states = $required_states;
}

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