class AutocompleteController

Same name and namespace in other branches
  1. 8.9.x core/modules/system/tests/modules/form_test/src/AutocompleteController.php \Drupal\form_test\AutocompleteController
  2. 10 core/modules/system/tests/modules/form_test/src/AutocompleteController.php \Drupal\form_test\AutocompleteController
  3. 11.x core/modules/system/tests/modules/form_test/src/AutocompleteController.php \Drupal\form_test\AutocompleteController

Defines a controller class with methods for autocompletion.

Hierarchy

Expanded class hierarchy of AutocompleteController

File

core/modules/system/tests/modules/form_test/src/AutocompleteController.php, line 10

Namespace

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

}

Members

Title Sort descending Modifiers Object type Summary
AutocompleteController::autocomplete1 public function Returns some autocompletion content.

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