lightning_scheduler-8.x-1.x-dev/lightning_scheduler.install

lightning_scheduler.install
<?php

/**
 * Cache clear because of service argument changes.
 */
function lightning_scheduler_update_9001(&$sandbox) {
  // Forcing cache clear for service argument changes.
}

/**
 * Set the new config setting allow_past_dates to true.
 */
function lightning_scheduler_update_9002(&$sandbox) {
  // Get the configFactory.
  $config_factory = \Drupal::configFactory();
  // Get the editable configuration for the lightning_scheduler module.
  $lightning_scheduler_configuration = $config_factory->getEditable('lightning_scheduler.settings');
  // Set allow_past_dates to TRUE for existing sites.
  $lightning_scheduler_configuration->set('allow_past_dates', TRUE);
  // Save the configuration changes.
  $lightning_scheduler_configuration->save();
}

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

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