You are here

mongodb.install in MongoDB 6

Same filename and directory in other branches
  1. 8 mongodb.install
  2. 7 mongodb.install

Install file for MongoDB module.

File

mongodb.install
View source
<?php

/**
 * @file
 * Install file for MongoDB module.
 */

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

  // Ensure translations don't break at install time.
  $t = get_t();
  if (!extension_loaded('mongo')) {
    $requirements['mongodb'] = array(
      'title' => $t('MongoDB'),
      'value' => $t('Not found'),
      'description' => $t('MongoDB requires the PHP MongoDB extension to be installed.'),
      'severity' => REQUIREMENT_ERROR,
    );
  }
  return $requirements;
}

Functions

Namesort descending Description
mongodb_requirements Implements hook_requirements().