You are here

function open_readspeaker_update_8103 in Open ReadSpeaker 8

Make the ReadSpeaker URL configureable using tokens.

File

./open_readspeaker.install, line 34
Requirements and update functions for the Open ReadSpeaker module.

Code

function open_readspeaker_update_8103() {
  $source = new FileStorage(__DIR__ . '/config/install');
  $newConfig = $source
    ->read('open_readspeaker.settings');
  $config_factory = \Drupal::configFactory();
  $config = $config_factory
    ->getEditable('open_readspeaker.settings');
  $config
    ->set('open_readspeaker_url', $newConfig['open_readspeaker_url']);
  $config
    ->save(TRUE);
}