You are here

function social_core_update_10103 in Open Social 10.2.x

Same name and namespace in other branches
  1. 10.3.x modules/social_features/social_core/social_core.install \social_core_update_10103()
  2. 10.1.x modules/social_features/social_core/social_core.install \social_core_update_10103()

Add a OS favicon on the admin pages.

File

modules/social_features/social_core/social_core.install, line 1336
Install, update and uninstall functions for the social_core module.

Code

function social_core_update_10103() {
  $config = \Drupal::configFactory()
    ->getEditable('gin.settings');
  if (!empty($config
    ->getRawData())) {
    $gin_config = $config
      ->getRawData();

    // Update the favicon in GIN.
    $gin_config['favicon']['use_default'] = FALSE;
    $gin_config['favicon']['path'] = 'themes/contrib/socialblue/favicon.ico';
    $gin_config['favicon']['mimetype'] = 'image/vnd.microsoft.icon';
    $config
      ->setData($gin_config);
    $config
      ->save();
  }
}