function EntityAutocompleteController::__construct

Same name in other branches
  1. 8.9.x core/modules/system/src/Controller/EntityAutocompleteController.php \Drupal\system\Controller\EntityAutocompleteController::__construct()
  2. 10 core/modules/system/src/Controller/EntityAutocompleteController.php \Drupal\system\Controller\EntityAutocompleteController::__construct()
  3. 11.x core/modules/system/src/Controller/EntityAutocompleteController.php \Drupal\system\Controller\EntityAutocompleteController::__construct()

Constructs an EntityAutocompleteController object.

Parameters

\Drupal\Core\Entity\EntityAutocompleteMatcherInterface $matcher: The autocomplete matcher for entity references.

\Drupal\Core\KeyValueStore\KeyValueStoreInterface $key_value: The key value factory.

File

core/modules/system/src/Controller/EntityAutocompleteController.php, line 43

Class

EntityAutocompleteController
Defines a route controller for entity autocomplete form elements.

Namespace

Drupal\system\Controller

Code

public function __construct(EntityAutocompleteMatcherInterface $matcher, KeyValueStoreInterface $key_value) {
    $this->matcher = $matcher;
    $this->keyValue = $key_value;
}

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