PositionShimTestController.php

Same filename in other branches
  1. 9 core/modules/system/tests/modules/position_shim_test/src/Controller/PositionShimTestController.php
  2. 11.x core/modules/system/tests/modules/position_shim_test/src/Controller/PositionShimTestController.php

Namespace

Drupal\position_shim_test\Controller

File

core/modules/system/tests/modules/position_shim_test/src/Controller/PositionShimTestController.php

View source
<?php

namespace Drupal\position_shim_test\Controller;

use Drupal\Core\Controller\ControllerBase;
class PositionShimTestController extends ControllerBase {
    
    /**
     * Provides a page with the jQuery UI position library for testing.
     *
     * @return array
     *   The render array.
     */
    public function build() {
        return [
            'reference1' => [
                '#type' => 'container',
                '#attributes' => [
                    'id' => 'position-reference-1',
                ],
            ],
            '#attached' => [
                'library' => [
                    'core/drupal.jquery.position',
                    'position_shim_test/position.shim.test',
                ],
            ],
        ];
    }

}

Classes

Title Deprecated Summary
PositionShimTestController

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