You are here

function social_event_update_8808 in Open Social 8.9

Same name and namespace in other branches
  1. 10.3.x modules/social_features/social_event/social_event.install \social_event_update_8808()
  2. 10.0.x modules/social_features/social_event/social_event.install \social_event_update_8808()
  3. 10.1.x modules/social_features/social_event/social_event.install \social_event_update_8808()
  4. 10.2.x modules/social_features/social_event/social_event.install \social_event_update_8808()

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_event/social_event.install, line 1513
Install, update and uninstall functions for the social_event module.

Code

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