You are here

public function Wizard::setParameter in Flexiform 8

File

contrib/wizard/src/Entity/Wizard.php, line 265

Class

Wizard
Defines a flexiform wizard entity class.

Namespace

Drupal\flexiform_wizard\Entity

Code

public function setParameter($name, $type, $label = '') {
  $this->parameters[$name] = [
    'machine_name' => $name,
    'type' => $type,
    'label' => $label,
  ];

  // Reset contexts when a parameter is added or changed.
  $this->contexts = [];
  return $this;
}