public function SpellCheck::buildOptionsForm in Search API Spellcheck 8
Provide a form to edit options for this plugin.
Overrides AreaPluginBase::buildOptionsForm
File
- src/
Plugin/ views/ area/ SpellCheck.php, line 56
Class
- SpellCheck
- Provides an area for messages.
Namespace
Drupal\search_api_spellcheck\Plugin\views\areaCode
public function buildOptionsForm(&$form, FormStateInterface $form_state) {
parent::buildOptionsForm($form, $form_state);
$form['search_api_spellcheck_filter_name'] = [
'#default_value' => $this->options['search_api_spellcheck_filter_name'] ?: 'query',
'#title' => $this
->t('Enter parameter name of text search filter'),
'#type' => 'textfield',
];
$form['search_api_spellcheck_hide_on_result'] = [
'#default_value' => $this->options['search_api_spellcheck_hide_on_result'] ?? TRUE,
'#title' => $this
->t('Hide when the view has results.'),
'#type' => 'checkbox',
];
}