f57728d53ff90bbc5af3a0d43ba84ee419fd8197
[yaffs-website] / web / core / modules / help / tests / modules / help_page_test / help_page_test.module
1 <?php
2
3 /**
4  * @file
5  * Help Page Test module to test the help page.
6  */
7
8 use Drupal\Core\Routing\RouteMatchInterface;
9
10 /**
11  * Implements hook_help().
12  */
13 function help_page_test_help($route_name, RouteMatchInterface $route_match) {
14
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.'];
24   }
25
26   // Ensure that hook_help() can return an empty string and not cause the block
27   // to display.
28   return '';
29 }