public function AutocompletionConfigurationFormBase::__construct in Search Autocomplete 8
Same name and namespace in other branches
- 2.x src/Form/AutocompletionConfigurationFormBase.php \Drupal\search_autocomplete\Form\AutocompletionConfigurationFormBase::__construct()
Construct the AutocompletionConfigurationFormBase.
For simple entity forms, there's no need for a constructor. Our autocompletion_configuration form base, however, requires an entity query factory to be injected into it from the container. We later use this query factory to build an entity query for the exists() method.
Parameters
\Drupal\Core\Entity\EntityStorageInterface $entity_storage: An entity query factory for the autocompletion_configuration entity type.
File
- src/
Form/ AutocompletionConfigurationFormBase.php, line 41
Class
- AutocompletionConfigurationFormBase
- Class AutocompletionConfigurationFormBase.
Namespace
Drupal\search_autocomplete\FormCode
public function __construct(EntityStorageInterface $entity_storage) {
$this->entityStorage = $entity_storage;
}