function varbase_update_8040 in Varbase: The Ultimate Drupal CMS Starter Kit (Bootstrap Ready) 8.4
Add Color Configs to the Available styles for Varbase Bootstrap Paragraphs.
File
- ./
varbase.install, line 506 - Install, update and uninstall functions for the Varbase installation profile.
Code
function varbase_update_8040() {
// Activate Varbase Bootstrap Paragraphs Settings in the active config.
if (\Drupal::moduleHandler()
->moduleExists('varbase_bootstrap_paragraphs')) {
$profile_path = drupal_get_path('profile', 'varbase') . '/config/optional/';
$config_path = $profile_path . 'varbase_bootstrap_paragraphs.settings.yml';
$config_content = file_get_contents($config_path);
$config_data = (array) Yaml::parse($config_content);
$config_factory = \Drupal::configFactory()
->getEditable('varbase_bootstrap_paragraphs.settings');
$config_factory
->setData($config_data)
->save(TRUE);
}
}