JsErrorsTestController.php

Same filename in other branches
  1. 10 core/modules/system/tests/modules/js_errors_test/src/Controller/JsErrorsTestController.php
  2. 11.x core/modules/system/tests/modules/js_errors_test/src/Controller/JsErrorsTestController.php

Namespace

Drupal\js_errors_test\Controller

File

core/modules/system/tests/modules/js_errors_test/src/Controller/JsErrorsTestController.php

View source
<?php

namespace Drupal\js_errors_test\Controller;


/**
 * Test Controller loading js_errors_test/errors_test library.
 */
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',
                ],
            ],
        ];
    }

}

Classes

Title Deprecated Summary
JsErrorsTestController Test Controller loading js_errors_test/errors_test library.

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