You are here

protected function SamlSpConfig::overriddenValue in SAML Service Provider 3.x

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

Return the overridden value (if overridden)

Parameters

string $name: The name of the config setting.

Return value

array|mixed|null The value the config setting.

1 call to SamlSpConfig::overriddenValue()
SamlSpConfig::buildForm in src/Form/SamlSpConfig.php
Form constructor.

File

src/Form/SamlSpConfig.php, line 46

Class

SamlSpConfig
Provides the configuration form.

Namespace

Drupal\saml_sp\Form

Code

protected function overriddenValue($name) {
  if ($this
    ->isOverridden($name)) {

    // Return the overridden value.
    $value = $this->configFactory
      ->get('saml_sp.settings')
      ->get($name);
  }
  else {

    // Return the value in the database.
    $value = $this->configFactory
      ->getEditable('saml_sp.settings')
      ->get($name);
  }
  return $value;
}