function social_topic_update_8909 in Open Social 10.3.x
Same name and namespace in other branches
- 10.0.x modules/social_features/social_topic/social_topic.install \social_topic_update_8909()
- 10.1.x modules/social_features/social_topic/social_topic.install \social_topic_update_8909()
- 10.2.x modules/social_features/social_topic/social_topic.install \social_topic_update_8909()
Show thumbnail on File fields when attachment is an image.
File
- modules/
social_features/ social_topic/ social_topic.install, line 403 - Install, update and uninstall functions for the social_topic module.
Code
function social_topic_update_8909() {
$config_file = drupal_get_path('module', 'social_topic') . '/config/static/core.entity_view_display.node.topic.default_8909.yml';
if (is_file($config_file)) {
$settings = Yaml::parse(file_get_contents($config_file));
if (is_array($settings)) {
$config = \Drupal::configFactory()
->getEditable('core.entity_view_display.node.topic.default');
$config
->setData($settings)
->save(TRUE);
}
}
}