You are here

class apachesolr_views_handler_filter_search in Apache Solr Views 6

Class that allows searching the site with Apache Solr through a view.

Hierarchy

Expanded class hierarchy of apachesolr_views_handler_filter_search

1 string reference to 'apachesolr_views_handler_filter_search'
apachesolr_views_views_data in ./apachesolr_views.views.inc
Implementation of hook_views_data().

File

handlers/apachesolr_views_handler_filter_search.inc, line 7

View source
class apachesolr_views_handler_filter_search extends views_handler_filter_search {
  public function query() {
    if (!empty($this->value)) {
      $this->query
        ->set_query($this->value);
    }
  }

  /**
   * Validate the options form.
   */
  function exposed_validate($form, &$form_state) {

    // Don't let Views do anything if the operator is required and nothing has
    // been supplied in the exposed form.
    if (empty($form_state['values'][$this->options['expose']['identifier']]) && $this->options['operator'] == 'required') {
      $this->view->executed = TRUE;
    }
  }

}

Members