You are here

public function Webform::setSettingOverride in Webform 8.5

Same name and namespace in other branches
  1. 6.x src/Entity/Webform.php \Drupal\webform\Entity\Webform::setSettingOverride()

Sets a webform setting override for a given key.

Using this methods stops a webform from being saved with the overridden setting.

Parameters

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

mixed $value: The data to store.

Return value

$this

Overrides WebformInterface::setSettingOverride

File

src/Entity/Webform.php, line 1030

Class

Webform
Defines the webform entity.

Namespace

Drupal\webform\Entity

Code

public function setSettingOverride($key, $value) {
  $this
    ->setSetting($key, $value);
  $this
    ->setOverride();
  return $this;
}