You are here

elf.install in External Links Filter 6.3

Same filename and directory in other branches
  1. 8 elf.install
  2. 7.3 elf.install

Installation and uninstallation functions.

File

elf.install
View source
<?php

/**
 * @file
 *   Installation and uninstallation functions.
 */

/**
 * Implementation of hook_uninstall().
 */
function elf_uninstall() {
  db_query("DELETE FROM {variable} WHERE name LIKE 'elf_%%'");
  cache_clear_all('variables', 'cache');
}

/**
 * Implementation of hook_requirements().
 */
function elf_requirements($phase) {
  $requirements = array();
  $loaded = extension_loaded('DOM');
  $requirements["elf_extension_dom"] = array(
    'title' => 'DOM',
    'value' => $loaded ? t('Loaded') : t('Not loaded'),
    'severity' => $loaded ? REQUIREMENT_OK : REQUIREMENT_ERROR,
    'description' => $loaded ? NULL : t('External Links Filter requires PHP\'s <a href="!url">Document Object Model</a>.', array(
      '!url' => 'http://php.net/manual/en/book.dom.php',
    )),
  );
  return $requirements;
}

Functions

Namesort descending Description
elf_requirements Implementation of hook_requirements().
elf_uninstall Implementation of hook_uninstall().