You are here

function bootstrap_layout_builder_update_8001 in Bootstrap Layout Builder 1.x

Same name and namespace in other branches
  1. 2.x bootstrap_layout_builder.install \bootstrap_layout_builder_update_8001()

Creates the new Bootstrap Layout Builder settings.

File

./bootstrap_layout_builder.install, line 13
Installation and updating routines.

Code

function bootstrap_layout_builder_update_8001() {
  $path = drupal_get_path('module', 'bootstrap_layout_builder') . '/config/install';
  $source = new FileStorage($path);
  $config_name = 'bootstrap_layout_builder.settings';

  /** @var \Drupal\Core\Config\StorageInterface $active_storage */
  $active_storage = \Drupal::service('config.storage');
  $active_storage
    ->write($config_name, $source
    ->read($config_name));
}