You are here

public function SettingsWebformHandler::overrideSettings in Webform 8.5

Same name and namespace in other branches
  1. 6.x src/Plugin/WebformHandler/SettingsWebformHandler.php \Drupal\webform\Plugin\WebformHandler\SettingsWebformHandler::overrideSettings()

Alter/override a webform submission webform settings.

IMPORTANT: Webform settings are overridden for just the webform submission. Overridden settings are never saved to the Webform's configuration.

Parameters

array $settings: An associative array containing the webform settings.

\Drupal\webform\WebformSubmissionInterface $webform_submission: A webform submission.

Overrides WebformHandlerBase::overrideSettings

File

src/Plugin/WebformHandler/SettingsWebformHandler.php, line 285

Class

SettingsWebformHandler
Webform submission settings handler.

Namespace

Drupal\webform\Plugin\WebformHandler

Code

public function overrideSettings(array &$settings, WebformSubmissionInterface $webform_submission) {
  $settings_override = $this
    ->getSubmissionSettingsOverride($webform_submission);
  foreach ($settings_override as $name => $value) {
    $settings[$name] = $value;
  }
  $this
    ->displayDebug($webform_submission);
}