You are here

public function YamlForm::setSetting in YAML Form 8

Saves a form setting for a given key.

Parameters

string $key: The key of the setting to store.

mixed $value: The data to store.

Return value

$this

Overrides YamlFormInterface::setSetting

File

src/Entity/YamlForm.php, line 465

Class

YamlForm
Defines the form entity.

Namespace

Drupal\yamlform\Entity

Code

public function setSetting($key, $value) {
  $settings = $this
    ->getSettings();
  $settings[$key] = $value;
  $this
    ->setSettings($settings);
  return $this;
}