function social_event_update_8907 in Open Social 10.3.x
Same name and namespace in other branches
- 10.0.x modules/social_features/social_event/social_event.install \social_event_update_8907()
- 10.1.x modules/social_features/social_event/social_event.install \social_event_update_8907()
- 10.2.x modules/social_features/social_event/social_event.install \social_event_update_8907()
Add image file extensions to be added as attachments.
File
- modules/
social_features/ social_event/ social_event.install, line 1642 - Install, update and uninstall functions for the social_event module.
Code
function social_event_update_8907() {
$config_file = drupal_get_path('module', 'social_event') . '/config/static/field.field.node.event.field_files_8907.yml';
if (is_file($config_file)) {
$settings = Yaml::parse(file_get_contents($config_file));
if (is_array($settings)) {
$config = \Drupal::configFactory()
->getEditable('field.field.node.event.field_files');
$config
->setData($settings)
->save(TRUE);
}
}
}