HelpPageTestController.php

Same filename in other branches
  1. 9 core/modules/help/tests/modules/help_page_test/src/HelpPageTestController.php
  2. 10 core/modules/help/tests/modules/help_page_test/src/HelpPageTestController.php
  3. 11.x core/modules/help/tests/modules/help_page_test/src/HelpPageTestController.php

Namespace

Drupal\help_page_test

File

core/modules/help/tests/modules/help_page_test/src/HelpPageTestController.php

View source
<?php

namespace Drupal\help_page_test;


/**
 * Provides controllers for testing the help block.
 */
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().',
        ];
    }

}

Classes

Title Deprecated Summary
HelpPageTestController Provides controllers for testing the help block.

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.