You are here

function social_core_update_8015 in Open Social 8.8

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

Update members path.

File

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

Code

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