You are here

elf.install in External Links Filter 8

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

Contains update functions for Elf module.

File

elf.install
View source
<?php

/**
 * @file
 * Contains update functions for Elf module.
 */

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

Functions

Namesort descending Description
elf_requirements Implements hook_requirements().