public function UpdateHelper::getKeyFromSettings in Evercurrent 8
Same name and namespace in other branches
- 8.2 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 183 - Contains Drupal\evercurrent\UpdateHelper.
Class
- UpdateHelper
- Class UpdateHelper.
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;
}