You are here

public function CoreSearchService::configurationForm in Fast Autocomplete 7

Implements SearchServiceInterface::configurationForm().

Overrides AbstractSearchService::configurationForm

File

src/SearchService/CoreSearchService.php, line 41

Class

CoreSearchService
Fast Autocomplete backend service class providing Drupal core search.

Namespace

Drupal\fac\SearchService

Code

public function configurationForm(array $form, array &$form_state) {
  $form = array();
  $settings = variable_get('fac_backend_service_settings', array());
  $form['number_of_results'] = array(
    '#type' => 'textfield',
    '#title' => t('Number of results'),
    '#required' => TRUE,
    '#size' => 2,
    '#default_value' => isset($settings['number_of_results']) ? $settings['number_of_results'] : 5,
    '#description' => t('The maximum number of results the service returns. Core search is limited to a maximum of 10 results'),
  );
  $form['submit'] = array(
    '#type' => 'submit',
    '#value' => t('Save'),
  );
  return $form;
}