function ManyAssetsTestController::build

Same name and namespace 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. 11.x 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 14

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.