You are here

function social_group_update_8802 in Open Social 10.2.x

Same name and namespace in other branches
  1. 8.9 modules/social_features/social_group/social_group.install \social_group_update_8802()
  2. 10.3.x modules/social_features/social_group/social_group.install \social_group_update_8802()
  3. 10.0.x modules/social_features/social_group/social_group.install \social_group_update_8802()
  4. 10.1.x modules/social_features/social_group/social_group.install \social_group_update_8802()

Add new field for rendered profile entity so we can sort it.

Load in a config file from an specific update hook that will never change. Update helper did not update all fields correctly.

File

modules/social_features/social_group/social_group.install, line 542
Install, update and uninstall functions for the social_group module.

Code

function social_group_update_8802() {
  $config_file = drupal_get_path('module', 'social_group') . '/config/update/social_group_update_8802.yml';
  if (is_file($config_file)) {
    $settings = Yaml::parse(file_get_contents($config_file));
    if (is_array($settings)) {
      $config = \Drupal::configFactory()
        ->getEditable('views.view.group_manage_members');
      $config
        ->setData($settings)
        ->save(TRUE);
    }
  }
}