You are here

sparkpost.install in Sparkpost email 8.2

Same filename and directory in other branches
  1. 7.2 sparkpost.install
  2. 7 sparkpost.install

Install, update and uninstall functions for the Sparkpost module.

File

sparkpost.install
View 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

Namesort descending Description
sparkpost_update_8001 Sets API hostname to default (api.sparkpost.com).