我已经将我的贡献移植到 Drupal 8 有一段时间了,随着关于 hook_menu_links_default 的最新更改被删除和 menu_links.yml 被添加,我被卡住了。即使我一直在检查核心模块的代码。长话短说,我的链接没有出现在/admin/config/system
. 你能帮助我吗?以下是我的文件。
tcmb.menu_links.yml:
tcmb.tcmb_settings:
title: Tcmb General Settings
description: 'Configure Tcmb module.'
route_name: tcmb.tcmb_settings
parent: system.admin_config_system
weight: 1
tcmb.tcmb_settings_currency:
title: 'Tcmb General Settings'
description: 'Configure Tcmb module.'
route_name: tcmb.tcmb_settings
parent: system_admin_config_system
weight: 1
tcmb.gold_settings
title: 'Gold settings'
description: 'Configure Tcmb gold settings.'
route_name: tcmb.gold_settings
parent: tcmb.admin_config_system_tcmb_settings
weight: 2
tcmb.other_settings:
title: 'Other settings'
description: 'Configure other settings.'
route_name: tcmb.other_settings
parent: tcmb.admin_config_system_tcmb_settings
weight: 3
tcmb.other_settings_currency:
title: 'Currency Settings'
description: 'Configure other settings.'
route_name: tcmb.other_settings_currency
parent: tcmb.tcmb_other_settings
weight: 1
tcmb.other_settings_gold:
title: Gold Settings
description: 'Gold Settings'
route_name: tcmb.other_settings_gold
parent: tcmb.tcmb_other_settings
weight: 2
tcmb.routing.yml:
tcmb.tcmb_settings:
path: '/admin/config/system/tcmb-settings'
defaults:
_form: 'Drupal\tcmb\TcmbCurrencySettingsForm'
_title: 'Tcmb General Settings'
requirements:
_permission: 'administer Tcmb'
tcmb.gold_settings:
path: '/admin/config/system/tcmb-settings/gold-settings'
defaults:
_form: 'Drupal\tcmb\TcmbGoldSettingsForm'
requirements:
_permission: 'administer Tcmb'
tcmb.other_settings:
path: '/admin/config/system/tcmb-settings/other-settings'
defaults:
_form: 'Drupal\tcmb\TcmbOtherSettingsForm'
requirements:
_permission: 'administer Tcmb'
tcmb.other_settings_currency:
path: '/admin/config/system/tcmb-settings/other-settings/currency'
defaults:
_form: 'Drupal\tcmb\TcmbOtherSettingsForm'
requirements:
_permission: 'administer Tcmb'
tcmb.other_settings_gold:
path: '/admin/config/system/tcmb-settings/other-settings/gold'
defaults:
_form: 'Drupal\tcmb\TcmbOtherGoldSettingsForm'
requirements:
_permission: 'administer Tcmb'
问候, mto