You are here

AutocompleteController.php in Drupal 9

Namespace

Drupal\form_test

File

core/modules/system/tests/modules/form_test/src/AutocompleteController.php
View source
<?php

namespace Drupal\form_test;

use Symfony\Component\HttpFoundation\JsonResponse;

/**
 * Defines a controller class with methods for autocompletion.
 */
class AutocompleteController {

  /**
   * Returns some autocompletion content.
   *
   * @return \Symfony\Component\HttpFoundation\JsonResponse
   *   A JSON response.
   */
  public function autocomplete1() {
    return new JsonResponse([
      'key' => 'value',
    ]);
  }

}

Classes

Namesort descending Description
AutocompleteController Defines a controller class with methods for autocompletion.