function domain_alias_set_environments in Domain Access 8
Sets the default set of environments.
1 call to domain_alias_set_environments()
- domain_alias_update_8002 in domain_alias/
domain_alias.install - Adds domain_alias environment settings.
File
- domain_alias/
domain_alias.install, line 11 - Install, update and uninstall functions for the Domain Alias module.
Code
function domain_alias_set_environments() {
$config = \Drupal::service('config.factory')
->getEditable('domain_alias.settings');
// Set and save new message value.
$environments = [
'default',
'local',
'development',
'staging',
'testing',
];
$config
->set('environments', $environments)
->save();
}