public function PositionShimTestController::build in Drupal 9
Provides a page with the jQuery UI position library for testing.
Return value
array The render array.
1 string reference to 'PositionShimTestController::build'
- position_shim_test.routing.yml in core/
modules/ system/ tests/ modules/ position_shim_test/ position_shim_test.routing.yml - core/modules/system/tests/modules/position_shim_test/position_shim_test.routing.yml
File
- core/
modules/ system/ tests/ modules/ position_shim_test/ src/ Controller/ PositionShimTestController.php, line 15
Class
Namespace
Drupal\position_shim_test\ControllerCode
public function build() {
return [
'reference1' => [
'#type' => 'container',
'#attributes' => [
'id' => 'position-reference-1',
],
],
'#attached' => [
'library' => [
'core/jquery.ui.position',
'position_shim_test/position.shim.test',
],
],
];
}