You are here

class HelpPageTestController in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/help/tests/modules/help_page_test/src/HelpPageTestController.php \Drupal\help_page_test\HelpPageTestController
  2. 10 core/modules/help/tests/modules/help_page_test/src/HelpPageTestController.php \Drupal\help_page_test\HelpPageTestController

Provides controllers for testing the help block.

Hierarchy

Expanded class hierarchy of HelpPageTestController

File

core/modules/help/tests/modules/help_page_test/src/HelpPageTestController.php, line 8

Namespace

Drupal\help_page_test
View source
class HelpPageTestController {

  /**
   * Provides a route with help.
   *
   * @return array
   *   A render array.
   */
  public function hasHelp() {
    return [
      '#markup' => 'A route with help.',
    ];
  }

  /**
   * Provides a route with no help.
   *
   * @return array
   *   A render array.
   */
  public function noHelp() {
    return [
      '#markup' => 'A route without help.',
    ];
  }

  /**
   * Provides a route which has multiple array returns from hook_help().
   *
   * @return array
   *   A render array.
   */
  public function testArray() {
    return [
      '#markup' => 'A route which has multiple array returns from hook_help().',
    ];
  }

}

Members

Namesort descending Modifiers Type Description Overrides
HelpPageTestController::hasHelp public function Provides a route with help.
HelpPageTestController::noHelp public function Provides a route with no help.
HelpPageTestController::testArray public function Provides a route which has multiple array returns from hook_help().