You are here

public function SearchApiStopWords::configurationFormValidate in Search API 7

Validation callback for the form returned by configurationForm().

Parameters

array $form: The form returned by configurationForm().

array $values: The part of the $form_state['values'] array corresponding to this form.

array $form_state: The complete form state.

Overrides SearchApiAbstractProcessor::configurationFormValidate

File

includes/processor_stopwords.inc, line 47
Contains SearchApiStopWords.

Class

SearchApiStopWords
Processor for removing stopwords from index and search terms.

Code

public function configurationFormValidate(array $form, array &$values, array &$form_state) {
  parent::configurationFormValidate($form, $values, $form_state);
  $uri = $values['file'];
  if (!empty($uri) && !@file_get_contents($uri)) {
    $el = $form['file'];
    form_error($el, t('Stopwords file') . ': ' . t('The file %uri is not readable or does not exist.', array(
      '%uri' => $uri,
    )));
  }
}