billwerk_subscriptions-1.x-dev/modules/billwerk_subscriptions_handler_default/billwerk_subscriptions_handler_default.install

modules/billwerk_subscriptions_handler_default/billwerk_subscriptions_handler_default.install
<?php

/**
 * @file
 * Billwerk subscription install file.
 *
 * Install, update and uninstall functions for the Billwerk Subscriptions
 * module.
 */

/**
 * Rename old and initialize new config variables.
 */
function billwerk_subscriptions_handler_default_update_10001(&$sandbox) {
  $config = \Drupal::configFactory()->getEditable('billwerk_subscriptions_handler_default.settings');
  $config->set('on_drupal_user_delete', $config->get('on_user_delete_delete_customer') ? 'delete' : '')
    ->set('on_drupal_user_block', '')
    ->set('on_drupal_user_unblock', '')
    ->set('on_billwerk_contract_deleted', '')
    ->set('on_billwerk_contract_cancelled', '')
    // Keep existing behavior:
    ->set('on_billwerk_customer_deleted', 'block')
    ->set('on_billwerk_customer_locked', '')
    ->set('on_billwerk_customer_unlocked', '')
    ->set('on_billwerk_customer_payment_escalated', '')
    ->set('on_billwerk_customer_payment_escalation_reset', '')
    ->clear('on_user_delete_delete_customer')
    ->save();
}

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

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