function social_core_update_8014 in Open Social 8.6
Same name and namespace in other branches
- 8.9 modules/social_features/social_core/social_core.install \social_core_update_8014()
- 8 modules/social_features/social_core/social_core.install \social_core_update_8014()
- 8.2 modules/social_features/social_core/social_core.install \social_core_update_8014()
- 8.3 modules/social_features/social_core/social_core.install \social_core_update_8014()
- 8.4 modules/social_features/social_core/social_core.install \social_core_update_8014()
- 8.5 modules/social_features/social_core/social_core.install \social_core_update_8014()
- 8.7 modules/social_features/social_core/social_core.install \social_core_update_8014()
- 8.8 modules/social_features/social_core/social_core.install \social_core_update_8014()
- 10.3.x modules/social_features/social_core/social_core.install \social_core_update_8014()
- 10.0.x modules/social_features/social_core/social_core.install \social_core_update_8014()
- 10.1.x modules/social_features/social_core/social_core.install \social_core_update_8014()
- 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();
}
}