You are here

function users_export_requirements in Users Export 7.2

Implements hook_requirements().

File

./users_export.install, line 78
Handles installation steps for users_export.

Code

function users_export_requirements($phase) {
  $reqs = array();
  $t = get_t();
  if ($phase == 'runtime') {
    $modules = array();
    if (!module_exists('loft_data_grids')) {
      $modules[] = 'loft_data_grids';
    }
    if ($modules) {
      $reqs['users_export'] = array(
        'title' => $t('Users Export Dependencies'),
        'description' => $t('The following module(s) need to be enabled: %modules', array(
          '%modules' => implode(', ', $modules),
        )),
        'severity' => REQUIREMENT_ERROR,
        'value' => $t('Missing'),
      );
    }
    if (!function_exists('loft_data_grids_info')) {
      $reqs['users_export'] = array(
        'title' => $t('Users Export'),
        'description' => $t('Please upgrade <a href="!url">Loft Data Grids</a> to the 2.x branch immediately!', array(
          '!url' => url('http://www.intheloftstudios.com/packages/php/drupal_loft_data_grids'),
        )),
        'severity' => REQUIREMENT_ERROR,
        'value' => $t('Outdated dependency'),
      );
    }
  }
  return $reqs;
}