function _social_core_create_menu_links in Open Social 8.4
Same name and namespace in other branches
- 8.9 modules/social_features/social_core/social_core.install \_social_core_create_menu_links()
- 8 modules/social_features/social_core/social_core.install \_social_core_create_menu_links()
- 8.2 modules/social_features/social_core/social_core.install \_social_core_create_menu_links()
- 8.3 modules/social_features/social_core/social_core.install \_social_core_create_menu_links()
- 8.5 modules/social_features/social_core/social_core.install \_social_core_create_menu_links()
- 8.6 modules/social_features/social_core/social_core.install \_social_core_create_menu_links()
- 8.7 modules/social_features/social_core/social_core.install \_social_core_create_menu_links()
- 8.8 modules/social_features/social_core/social_core.install \_social_core_create_menu_links()
- 10.3.x modules/social_features/social_core/social_core.install \_social_core_create_menu_links()
- 10.0.x modules/social_features/social_core/social_core.install \_social_core_create_menu_links()
- 10.1.x modules/social_features/social_core/social_core.install \_social_core_create_menu_links()
- 10.2.x modules/social_features/social_core/social_core.install \_social_core_create_menu_links()
Function to create some menu items.
1 call to _social_core_create_menu_links()
- social_core_install in modules/
social_features/ social_core/ social_core.install - Implements hook_install().
File
- modules/
social_features/ social_core/ social_core.install, line 234 - Install, update and uninstall functions for the social_comment module.
Code
function _social_core_create_menu_links() {
// Home.
MenuLinkContent::create([
'title' => t('Home'),
'link' => [
'uri' => 'internal:/',
],
'menu_name' => 'main',
'expanded' => FALSE,
'weight' => 10,
])
->save();
// Explore.
MenuLinkContent::create([
'title' => t('Explore'),
// This way we get an empty link.
'link' => [
'uri' => 'internal:',
],
'menu_name' => 'main',
'expanded' => TRUE,
'weight' => 20,
])
->save();
}