You are here

rest_server.install in Services 7.3

Same filename and directory in other branches
  1. 6.3 servers/rest_server/rest_server.install

Install, uninstall and update the rest server module.

File

servers/rest_server/rest_server.install
View source
<?php

/**
 * @file
 * Install, uninstall and update the rest server module.
 */

/**
 * Implements hook_requirements().
 */
function rest_server_requirements($phase) {
  $requirements = array();

  // Report the version of libraries.
  if ($phase == 'runtime') {
    drupal_load('module', 'libraries');
    $libraries = rest_server_libraries_info();
    foreach ($libraries as $name => $info) {
      $library = libraries_detect($name);
      $requirements[$name] = array(
        'title' => $library['name'],
        'severity' => $library['installed'] ? REQUIREMENT_OK : REQUIREMENT_WARNING,
        'value' => $library['installed'] ? l($library['version'], $library['vendor url']) : $library['error message'],
      );
    }
  }
  return $requirements;
}

/**
 * Implements hook_uninstall().
 */
function rest_server_uninstall() {
  variable_del('rest_server_default_response_format');
}

Functions