public function UpdateHelper::getKeyFromSettings in Evercurrent 8.2
Same name and namespace in other branches
- 8 src/UpdateHelper.php \Drupal\evercurrent\UpdateHelper::getKeyFromSettings()
Retrieve a key from settings.php, or from variable.
1 call to UpdateHelper::getKeyFromSettings()
- UpdateHelper::sendUpdates in src/
UpdateHelper.php - Send updates to the Maintenance server.
File
- src/
UpdateHelper.php, line 201
Class
- UpdateHelper
- Default UpdateHelper instantiation.
Namespace
Drupal\evercurrentCode
public function getKeyFromSettings() {
$config = \Drupal::config('evercurrent.admin_config');
$override = $config
->get('override');
// Key from regular configuration.
$config_key = $config
->get('key');
// Key from settings.php.
$settings_key = Settings::get('evercurrent_environment_token', NULL);
// If.
return $settings_key && !$override ? $settings_key : $config_key;
}