function thunder_requirements in Thunder 8.2
Same name and namespace in other branches
- 8.5 thunder.install \thunder_requirements()
- 8.3 thunder.install \thunder_requirements()
- 8.4 thunder.install \thunder_requirements()
Implements hook_requirements().
File
- ./
thunder.install, line 1208 - Install, update and uninstall functions for the thunder installation profile.
Code
function thunder_requirements($phase) {
// Bail out if we are not in 'update' phase
// or a simpletest testing environment is present.
if ($phase !== 'update' || drupal_valid_test_ua() !== FALSE) {
return [];
}
$requirements = [];
if (array_key_exists('paragraphs', \Drupal::moduleHandler()
->getModuleList())) {
$paragraphs_schema = drupal_get_installed_schema_version('paragraphs');
if ($paragraphs_schema < 8021) {
$requirements['thunder'] = [
'title' => t('Thunder'),
'description' => t('The paragraphs version installed is too old for update. Update paragraphs module to version 1.10 before updating to latest thunder.'),
'severity' => REQUIREMENT_ERROR,
];
}
}
return $requirements;
}