You are here

PositionShimTestController.php in Drupal 9

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/jquery.ui.position',
          'position_shim_test/position.shim.test',
        ],
      ],
    ];
  }

}

Classes