function ManyAssetsTestController::build

Same name in other branches
  1. 9 core/modules/system/tests/modules/many_assets_test/src/Controller/ManyAssetsTestController.php \Drupal\many_assets_test\Controller\ManyAssetsTestController::build()
  2. 10 core/modules/system/tests/modules/many_assets_test/src/Controller/ManyAssetsTestController.php \Drupal\many_assets_test\Controller\ManyAssetsTestController::build()

The render array of the assets testing page.

Return value

array

1 string reference to 'ManyAssetsTestController::build'
many_assets_test.routing.yml in core/modules/system/tests/modules/many_assets_test/many_assets_test.routing.yml
core/modules/system/tests/modules/many_assets_test/many_assets_test.routing.yml

File

core/modules/system/tests/modules/many_assets_test/src/Controller/ManyAssetsTestController.php, line 16

Class

ManyAssetsTestController

Namespace

Drupal\many_assets_test\Controller

Code

public function build() {
    return [
        '#markup' => 'I am a page that tests loading order of many dependencies',
        '#attached' => [
            'library' => [
                'many_assets_test/weighted',
                'many_assets_test/many-dependencies',
                'many_assets_test/weighted_again',
            ],
        ],
    ];
}

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