You are here

acquia_search_multi_subs.install in Acquia Search Multiple Indexes 8

Same filename and directory in other branches
  1. 7 acquia_search_multi_subs.install

Module state handling for the Acquia Search Multi Subscription module.

File

acquia_search_multi_subs.install
View source
<?php

/**
 * @file
 * Module state handling for the Acquia Search Multi Subscription module.
 */

/**
 * Implements hook_enable().
 *
 * Updates the subscription so that new Search Indexes connected to the user's
 * subscription can be pulled in and selected to be connected to.
 */
function acquia_search_multi_subs_enable() {

  // TODO: Port to D8.
  acquia_agent_check_subscription();
}

/**
 * Implements hook_uninstall().
 *
 * Remove variables from any environment that would have this information
 */
function acquia_search_multi_subs_uninstall() {
  return;

  // TODO: Port to D8.
  if (module_exists('search_api_solr')) {
    $servers = db_select('search_api_server', 's')
      ->fields('s')
      ->execute()
      ->fetchCol();
    foreach ($servers as $server_id) {
      $server = search_api_server_load($server_id);
      unset($server->options['acquia_override_subscription']);
      $server
        ->save();
    }
  }
  variable_del('acquia_search_multi_subs_subscription_cache_time');
}

/**
 * Implements hook_disable().
 *
 * Remove config overrides.
 */
function acquia_search_multi_subs_disable() {

  // TODO: Port to D8.
  // We want to also remove all config overrides when we disable it to avoid
  // confusion.
  acquia_search_multi_subs_uninstall();
}

Functions

Namesort descending Description
acquia_search_multi_subs_disable Implements hook_disable().
acquia_search_multi_subs_enable Implements hook_enable().
acquia_search_multi_subs_uninstall Implements hook_uninstall().