You are here

shorten.install in Shorten URLs 8

(Un)installs the Shorten module.

File

shorten.install
View source
<?php

/**
 * @file
 *   (Un)installs the Shorten module.
 */

/**
 * Implements hook_schema().
 */
function shorten_schema() {
  $schema = array();

  // $schema['cache_shorten'] = drupal_get_schema_unprocessed('system', 'cache');
  return $schema;
}

/**
 * Implements hook_update_N().
 * Removes the shorten_generate_token variable since the token module now loads
 * tokens only when needed.
 */
function shorten_update_7001() {
  \Drupal::config('shorten.settings')
    ->clear('shorten_generate_token')
    ->save();
}

/**
 * Implements hook_update_N().
 * Removes variables for deprecated services.
 */
function shorten_update_7002() {
  \Drupal::config('shorten.settings')
    ->clear('shorten_cligs')
    ->save();
  \Drupal::config('shorten.settings')
    ->clear('shorten_redirec')
    ->save();
}

Functions

Namesort descending Description
shorten_schema Implements hook_schema().
shorten_update_7001 Implements hook_update_N(). Removes the shorten_generate_token variable since the token module now loads tokens only when needed.
shorten_update_7002 Implements hook_update_N(). Removes variables for deprecated services.