function social_follow_tag_update_8801 in Open Social 10.1.x
Same name and namespace in other branches
- 10.3.x modules/social_features/social_follow_taxonomy/modules/social_follow_tag/social_follow_tag.install \social_follow_tag_update_8801()
- 10.0.x modules/social_features/social_follow_taxonomy/modules/social_follow_tag/social_follow_tag.install \social_follow_tag_update_8801()
- 10.2.x modules/social_features/social_follow_taxonomy/modules/social_follow_tag/social_follow_tag.install \social_follow_tag_update_8801()
Revert configs.
File
- modules/
social_features/ social_follow_taxonomy/ modules/ social_follow_tag/ social_follow_tag.install, line 26 - Install, update functions for the social_follow_tag module.
Code
function social_follow_tag_update_8801() {
$config_files = [
'message.template.create_node_following_tag_stream',
'message.template.update_node_following_tag',
];
foreach ($config_files as $config_file) {
$config = drupal_get_path('module', 'social_follow_tag') . '/config/install/' . $config_file . '.yml';
if (is_file($config)) {
$settings = Yaml::parse(file_get_contents($config));
if (is_array($settings)) {
$update_config = \Drupal::configFactory()
->getEditable($config_file);
$update_config
->setData($settings)
->save(TRUE);
}
}
}
}