5 * Help Page Test module to test the help page.
8 use Drupal\Core\Routing\RouteMatchInterface;
11 * Implements hook_help().
13 function help_page_test_help($route_name, RouteMatchInterface $route_match) {
15 switch ($route_name) {
16 case 'help.page.help_page_test':
17 // Make the help text conform to core standards. See
18 // \Drupal\system\Tests\Module\InstallUninstallTest::assertHelp().
19 return t('Read the <a href=":url">online documentation for the Help Page Test module</a>.', [':url' => 'http://www.example.com']);
20 case 'help_page_test.has_help':
21 return t('I have help!');
22 case 'help_page_test.test_array':
23 return ['#markup' => 'Help text from help_page_test_help module.'];
26 // Ensure that hook_help() can return an empty string and not cause the block