Commit 91039bb4 authored by Alexandre Dias's avatar Alexandre Dias Committed by Markus Kalkbrenner
Browse files

Issue #3277693: Missing schema

parent 8b390571
Loading
Loading
Loading
Loading
+24 −0
Original line number Diff line number Diff line
views.area.search_api_spellcheck_did_you_mean:
  type: views_area
  label: 'Did you mean'
  mapping:
    search_api_spellcheck_count:
      type: integer
      label: 'Specifies the maximum number of suggestion.'
    search_api_spellcheck_hide_on_result:
      type: boolean
      label: 'Hide when the view has results.'
    search_api_spellcheck_collate:
      type: boolean
      label: 'The amount of results to show.'

views.area.search_api_spellcheck_suggestions:
  type: views_area
  label: 'Suggestions'
  mapping:
    search_api_spellcheck_count:
      type: integer
      label: 'Specifies the maximum number of suggestion.'
    search_api_spellcheck_collate:
      type: boolean
      label: 'The amount of results to show.'
+9 −0
Original line number Diff line number Diff line
@@ -199,4 +199,13 @@ class DidYouMeanSpellCheck extends AreaPluginBase {
    return Link::fromTextAndUrl($new_keys, $url);
  }

  /**
   * {@inheritdoc}
   */
  public function validateOptionsForm(&$form, FormStateInterface $form_state): void {
    // Cast to boolean to honour the plugin config schema.
    $path = ['options', 'search_api_spellcheck_hide_on_result'];
    $form_state->setValue($path, (bool) $form_state->getValue($path));
    parent::validateOptionsForm($form, $form_state);
  }
}