You are here

function thunder_requirements in Thunder 8.5

Same name and namespace in other branches
  1. 8.2 thunder.install \thunder_requirements()
  2. 8.3 thunder.install \thunder_requirements()
  3. 8.4 thunder.install \thunder_requirements()

Implements hook_requirements().

File

./thunder.install, line 104
Install, update and uninstall functions for the thunder installation profile.

Code

function thunder_requirements($phase) {
  if ($phase !== 'update') {
    return [];
  }
  $requirements = [];
  $thunder_schema = drupal_get_installed_schema_version('thunder');
  if ($thunder_schema > 8000 && $thunder_schema < 8138) {
    $requirements['thunder'] = [
      'title' => t('Thunder'),
      'description' => t('You need to update to the latest version of Thunder 2 before switching to Thunder 3.'),
      'severity' => REQUIREMENT_ERROR,
    ];
  }
  return $requirements;
}