function testing_site_config_install
Same name in other branches
- 9 core/profiles/testing_site_config/testing_site_config.install \testing_site_config_install()
- 8.9.x core/profiles/testing_site_config/testing_site_config.install \testing_site_config_install()
- 11.x core/profiles/testing_site_config/testing_site_config.install \testing_site_config_install()
- 11.x core/profiles/tests/testing_site_config/testing_site_config.install \testing_site_config_install()
Implements hook_install().
File
-
core/
profiles/ testing_site_config/ testing_site_config.install, line 11
Code
function testing_site_config_install() {
// Set the site email address to something that is not sendmail_from.
\Drupal::configFactory()->getEditable('system.site')
->set('mail', 'profile-testing-site-config@example.com')
->save(TRUE);
// Set the time zone to something that is not the system timezone (which is
// Australia/Sydney in the testing environment).
\Drupal::configFactory()->getEditable('system.date')
->set('timezone.default', 'America/Los_Angeles')
->save(TRUE);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.