recurly-8.x-1.x-dev/modules/recurly_hosted/recurly_hosted.install
modules/recurly_hosted/recurly_hosted.install
<?php
/**
* @file
* Install hooks for Recurly Hosted module.
*/
/**
* Implements hook_requirements().
*/
function recurly_hosted_requirements($phase) {
$requirements = [];
if ($phase === 'install') {
// Verify that recurlyjs isn't enabled at the same time.
if (\Drupal::moduleHandler()->moduleExists('recurlyjs')) {
$requirements['recurly_hosted_conflict'] = [
'title' => t('Recurly.js conflict'),
'description' => t('The "Recurly hosted pages" could not be enabled because the Recurly.js module is active. If specifically needing to use Recurly hosted pages, disable Recurly.js first.'),
'severity' => REQUIREMENT_ERROR,
];
}
}
return $requirements;
}
