recurly-8.x-1.x-dev/modules/recurlyjs/recurlyjs.install

modules/recurlyjs/recurlyjs.install
<?php

/**
 * @file
 * Install hooks for Recurly module.
 */

/**
 * Implements hook_requirements().
 */
function recurlyjs_requirements($phase) {
  $requirements = [];
  if ($phase == 'runtime') {
    // Verify that recurly_hosted isn't enabled at the same time.
    if (\Drupal::moduleHandler()->moduleExists('recurly_hosted')) {
      $requirements['recurlyjs_conflict'] = [
        'title' => t('Recurly.js module conflict.'),
        'value' => t('The "Recurly hosted pages" module should not be enabled at the same time as Recurly.js module. Disable Recurly hosted pages module to prevent conflicts.'),
        'severity' => REQUIREMENT_ERROR,
      ];
    }
  }
  return $requirements;
}

/**
 * Implements hook_uninstall().
 */
function recurlyjs_uninstall() {
  \Drupal::configFactory()->getEditable('recurlyjs.settings')
    ->clear('recurlyjs_address_requirement')
    ->clear('recurlyjs_enable_add_ons')
    ->clear('recurlyjs_enable_coupons')
    ->clear('recurlyjs_accept_paypal')
    ->save();
}

Главная | Обратная связь

drupal hosting | друпал хостинг | it patrol .inc