class JsErrorsTestController

Same name and namespace in other branches
  1. 9 core/modules/system/tests/modules/js_errors_test/src/Controller/JsErrorsTestController.php \Drupal\js_errors_test\Controller\JsErrorsTestController
  2. 11.x core/modules/system/tests/modules/js_errors_test/src/Controller/JsErrorsTestController.php \Drupal\js_errors_test\Controller\JsErrorsTestController

Test Controller loading js_errors_test/errors_test library.

Hierarchy

Expanded class hierarchy of JsErrorsTestController

File

core/modules/system/tests/modules/js_errors_test/src/Controller/JsErrorsTestController.php, line 8

Namespace

Drupal\js_errors_test\Controller
View source
class JsErrorsTestController {
  
  /**
   * Renders page that has js_errors_test/errors_test library attached.
   *
   * @return string[][]
   *   Render array.
   */
  public function jsErrorsTest() : array {
    return [
      '#attached' => [
        'library' => [
          'js_errors_test/errors_test',
        ],
      ],
    ];
  }
  
  /**
   * Renders page that has js_errors_test/errors_async_test library attached.
   *
   * @return string[][]
   *   Render array.
   */
  public function jsErrorsAsyncTest() : array {
    return [
      '#attached' => [
        'library' => [
          'js_errors_test/errors_async_test',
        ],
      ],
    ];
  }

}

Members

Title Sort descending Modifiers Object type Summary
JsErrorsTestController::jsErrorsAsyncTest public function Renders page that has js_errors_test/errors_async_test library attached.
JsErrorsTestController::jsErrorsTest public function Renders page that has js_errors_test/errors_test library attached.

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