You are here

protected function SamlSpConfig::configRecurse in SAML Service Provider 8.2

Same name and namespace in other branches
  1. 8.3 src/Form/SamlSpConfig.php \Drupal\saml_sp\Form\SamlSpConfig::configRecurse()
  2. 4.x src/Form/SamlSpConfig.php \Drupal\saml_sp\Form\SamlSpConfig::configRecurse()
  3. 3.x src/Form/SamlSpConfig.php \Drupal\saml_sp\Form\SamlSpConfig::configRecurse()

recursively go through the set values to set the configuration

1 call to SamlSpConfig::configRecurse()
SamlSpConfig::submitForm in src/Form/SamlSpConfig.php
Form submission handler.

File

src/Form/SamlSpConfig.php, line 93
Contains \Drupal\saml_sp\Form\SamlSpConfigSPForm.

Class

SamlSpConfig

Namespace

Drupal\saml_sp\Form

Code

protected function configRecurse($config, $values, $base = '') {
  foreach ($values as $var => $value) {
    if (!empty($base)) {
      $v = $base . '.' . $var;
    }
    else {
      $v = $var;
    }
    if (!is_array($value)) {
      $config
        ->set($v, $value);
    }
    else {
      $this
        ->configRecurse($config, $value, $v);
    }
  }
}