You are here

function filelog_update_8101 in File Log 8

Same name and namespace in other branches
  1. 2.0.x filelog.install \filelog_update_8101()

Adds the new 'channels_type' and 'channels' keys to the module settings.

File

./filelog.install, line 37
Install functions for the filelog module.

Code

function filelog_update_8101(&$sandbox) {
  $config = Drupal::configFactory()
    ->getEditable('filelog.settings');
  $config
    ->set('channels_type', $config
    ->get('channels_type') ?? 'exclude');
  $config
    ->set('channels', $config
    ->get('channels') ?? []);
  $config
    ->save();
}