You are here

public function BasicTitleSearchService::configurationForm in Fast Autocomplete 7

Implements SearchServiceInterface::configurationForm().

Overrides AbstractSearchService::configurationForm

File

src/SearchService/BasicTitleSearchService.php, line 57

Class

BasicTitleSearchService
Fast Autocomplete backend service class for basic title search on nodes.

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.'),
  );
  $form['submit'] = array(
    '#type' => 'submit',
    '#value' => t('Save'),
  );
  return $form;
}