我是 Drupal 8 的新手,目前正在尝试为它创建一个模块。但是,花费了几个小时,我仍然无法使其工作。
以下是其中的两个文件:
#testmodule.routing.yml
testmodule.testmodule:
path: '/testmodule'
defaults:
_title: 'Index'
_content:
'\Drupal\testmodule\Controller\TestModuleController::testmodule'
requirements:
_permission: 'access content right away'
#testmodule.permissions.yml
access content right away:
title: 'Access content'
description: 'Access content right away.'
当我访问/testmodule
时,它一直告诉我访问被拒绝。有谁知道这个模块有什么问题吗?
提前致谢。