sparkpost.install in Sparkpost email 8.2
Same filename and directory in other branches
Install, update and uninstall functions for the Sparkpost module.
File
sparkpost.installView source
<?php
/**
* @file
* Install, update and uninstall functions for the Sparkpost module.
*/
/**
* Sets API hostname to default (api.sparkpost.com).
*/
function sparkpost_update_8001() {
$config_factory = \Drupal::configFactory();
$config = $config_factory
->getEditable('sparkpost.settings');
$current = $config
->get('api_hostname');
if (empty($current)) {
$config
->set('api_hostname', 'api.sparkpost.com');
$config
->save(TRUE);
return t('SparkPost hostname set to default (api.sparkpost.com).');
}
return NULL;
}
Functions
Name | Description |
---|---|
sparkpost_update_8001 | Sets API hostname to default (api.sparkpost.com). |