domain_alias.install in Domain Access 8
Same filename and directory in other branches
Install, update and uninstall functions for the Domain Alias module.
File
domain_alias/domain_alias.installView source
<?php
/**
* @file
* Install, update and uninstall functions for the Domain Alias module.
*/
/**
* Sets the default set of environments.
*/
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();
}
/**
* Updates domain_alias schema.
*/
function domain_alias_update_8001() {
$manager = \Drupal::entityDefinitionUpdateManager();
// Regenerate entity type indexes.
$manager
->updateEntityType($manager
->getEntityType('domain_alias'));
}
/**
* Adds domain_alias environment settings.
*/
function domain_alias_update_8002() {
// Set the default environments variable.
domain_alias_set_environments();
}
Functions
Name | Description |
---|---|
domain_alias_set_environments | Sets the default set of environments. |
domain_alias_update_8001 | Updates domain_alias schema. |
domain_alias_update_8002 | Adds domain_alias environment settings. |