You are here

search_api_federated_solr.install in Search API Federated Solr 7.2

Install, update, and uninstall functions for the search_api_federated_solr module.

File

search_api_federated_solr.install
View source
<?php

/**
 * @file
 * Install, update, and uninstall functions for the search_api_federated_solr module.
 */

/**
 * Implements hook_field_schema().
 */
function search_api_federated_solr_field_schema($field) {
  return array(
    'columns' => array(
      'value' => array(
        'type' => 'varchar',
        'length' => 255,
        'not null' => FALSE,
      ),
    ),
  );
}

/**
 * Sets default values on installation.
 */
function search_api_federated_solr_install() {
  variable_set('search_api_federated_solr_query_fields', [
    'rendered_item',
  ]);
}

/**
 * Update hook to install new defaults.
 */
function search_api_federated_solr_update_7100(&$sandbox) {
  variable_set('search_api_federated_solr_query_fields', [
    'rendered_item',
  ]);
}

/**
 * Removes variables on uninstall.
 */
function search_api_federated_solr_uninstall() {
  foreach (search_api_federated_solr_variables() as $var) {
    variable_del($var);
  }
}

Functions

Namesort descending Description
search_api_federated_solr_field_schema Implements hook_field_schema().
search_api_federated_solr_install Sets default values on installation.
search_api_federated_solr_uninstall Removes variables on uninstall.
search_api_federated_solr_update_7100 Update hook to install new defaults.