function social_core_update_8908 in Open Social 10.1.x
Same name and namespace in other branches
- 10.3.x modules/social_features/social_core/social_core.install \social_core_update_8908()
- 10.0.x modules/social_features/social_core/social_core.install \social_core_update_8908()
- 10.2.x modules/social_features/social_core/social_core.install \social_core_update_8908()
Add a new image thumbnail 'social_file_thumbnail' files field.
File
- modules/
social_features/ social_core/ social_core.install, line 1301 - Install, update and uninstall functions for the social_core module.
Code
function social_core_update_8908() {
$config_file = drupal_get_path('module', 'social_core') . '/config/static/image.style.social_file_thumbnails_8908.yml';
if (is_file($config_file)) {
$settings = Yaml::parse(file_get_contents($config_file));
if (is_array($settings)) {
$config = \Drupal::configFactory()
->getEditable('image.style.social_file_thumbnails');
$config
->setData($settings)
->save(TRUE);
}
}
}