/** * {@inheritdoc} */ public function preExecute() { // Make sure to only execute this once per query. if (!$this->preExecuteRan) { $this->preExecuteRan = TRUE; // Preprocess query. $this->index->preprocessSearchQuery($this); // Let modules alter the query. \Drupal::moduleHandler()->alter('search_api_query', $this); } }
/** * {@inheritdoc} */ public function preExecute() { // Make sure to only execute this once per query. if (!$this->preExecuteRan) { $this->preExecuteRan = TRUE; // Preprocess query. $this->index->preprocessSearchQuery($this); // Let modules alter the query. $hooks = array('search_api_query'); foreach ($this->tags as $tag) { $hooks[] = "search_api_query_{$tag}"; } \Drupal::moduleHandler()->alter($hooks, $this); } }
/** * {@inheritdoc} */ public function preExecute() { // Make sure to only execute this once per query. if (!$this->preExecuteRan) { $this->preExecuteRan = TRUE; // Add fulltext fields, unless set if ($this->fields === NULL) { $this->fields = $this->index->getFulltextFields(); } // Preprocess query. $this->index->preprocessSearchQuery($this); // Let modules alter the query. \Drupal::moduleHandler()->alter('search_api_query', $this); } }
/** * {@inheritdoc} */ public function preprocessSearchQuery(QueryInterface $query) { return $this->entity->preprocessSearchQuery($query); }