You are here

function social_event_update_8907 in Open Social 10.3.x

Same name and namespace in other branches
  1. 10.0.x modules/social_features/social_event/social_event.install \social_event_update_8907()
  2. 10.1.x modules/social_features/social_event/social_event.install \social_event_update_8907()
  3. 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);
    }
  }
}