You are here

function social_core_update_8014 in Open Social 8.6

Same name and namespace in other branches
  1. 8.9 modules/social_features/social_core/social_core.install \social_core_update_8014()
  2. 8 modules/social_features/social_core/social_core.install \social_core_update_8014()
  3. 8.2 modules/social_features/social_core/social_core.install \social_core_update_8014()
  4. 8.3 modules/social_features/social_core/social_core.install \social_core_update_8014()
  5. 8.4 modules/social_features/social_core/social_core.install \social_core_update_8014()
  6. 8.5 modules/social_features/social_core/social_core.install \social_core_update_8014()
  7. 8.7 modules/social_features/social_core/social_core.install \social_core_update_8014()
  8. 8.8 modules/social_features/social_core/social_core.install \social_core_update_8014()
  9. 10.3.x modules/social_features/social_core/social_core.install \social_core_update_8014()
  10. 10.0.x modules/social_features/social_core/social_core.install \social_core_update_8014()
  11. 10.1.x modules/social_features/social_core/social_core.install \social_core_update_8014()
  12. 10.2.x modules/social_features/social_core/social_core.install \social_core_update_8014()

Update topics path.

File

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

Code

function social_core_update_8014(&$sandbox) {
  $links = \Drupal::entityTypeManager()
    ->getStorage('menu_link_content')
    ->loadByProperties([
    'link__uri' => 'internal:/newest-topics',
  ]);
  if ($link = reset($links)) {
    $link
      ->set('link', [
      'uri' => 'internal:/all-topics',
    ]);
    $link
      ->save();
  }
}