I created a custom module in Drupal 9.3.8 with a hook_help function, basing it on what I see in other modules; the module is called node_usage, and the function in node_usage.module starts off like this:
function node_usage_help($route_name, RouteMatchInterface $route_match) { switch ($route_name) { case 'help.page.node_usage': $text = file_get_contents(__DIR__ . '/README.md'); .....
The problem is that it isn’t showing up on the extend page or from /admin/help after I enstall it. If I call $this->moduleHandler->getImplementations('help')
from within the help module, I don’t see my module come up in the list of modules with help functions. I’ve tried setting a breakpoint in token_help()
in the token module, and it does break there when I clear caches; why isn’t it getting called in my module? Must it be registered somehow? The module is otherwise working ok and other functions are being called.