added autocomplete with documents title in search form

This commit is contained in:
2018-04-17 23:00:18 +02:00
parent 82d5409957
commit 94175c1df1
2 changed files with 5 additions and 0 deletions
@@ -208,6 +208,9 @@ class EdlpSearchController extends ControllerBase {
// if($this->request->query->get('field_synonyms')){
$this->field_synonyms = $this->request->query->get('field_synonyms');
// }
// if($this->request->query->get('node_type')){
// $this->node_type = $this->request->query->get('node_type');
// }
$this->keys = $this->request->query->get('q');
}
@@ -29,6 +29,8 @@ class EdlpSearchForm extends FormBase {
'#title' => $this->t('Search'),
'keys' => [
'#type' => 'search',
'#autocomplete_route_name' => 'edlp_search.edlp_search_controller_autocomplete',
'#autocomplete_route_parameters' => array('field_name' => 'title'),
'#maxlength' => 20,
'#size' => 15,
'#weight' => '0',