You are here

public function YamlForm::setSettings in YAML Form 8

Sets the form settings.

Parameters

array $settings: The structured array containing all the form setting.

Return value

$this

Overrides YamlFormInterface::setSettings

1 call to YamlForm::setSettings()
YamlForm::setSetting in src/Entity/YamlForm.php
Saves a form setting for a given key.

File

src/Entity/YamlForm.php, line 444

Class

YamlForm
Defines the form entity.

Namespace

Drupal\yamlform\Entity

Code

public function setSettings(array $settings) {

  // Always apply the default settings.
  $this->settings = self::getDefaultSettings();

  // Now apply custom settings.
  foreach ($settings as $name => $value) {
    $this->settings[$name] = $value;
  }
  return $this;
}