You are here

function social_event_update_8915 in Open Social 10.2.x

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

Show thumbnail on File fields when attachment is an image.

File

modules/social_features/social_event/social_event.install, line 1787
Install, update and uninstall functions for the social_event module.

Code

function social_event_update_8915() {
  $config_file = drupal_get_path('module', 'social_event') . '/config/static/core.entity_view_display.node.event.default_8915.yml';
  if (is_file($config_file)) {
    $settings = Yaml::parse(file_get_contents($config_file));
    if (is_array($settings)) {
      $config = \Drupal::configFactory()
        ->getEditable('core.entity_view_display.node.event.default');
      $config
        ->setData($settings)
        ->save(TRUE);
    }
  }
}