コード例 #1
0
ファイル: Query.php プロジェクト: jkyto/agolf
  /**
   * {@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);
    }
  }
コード例 #2
0
ファイル: Query.php プロジェクト: curveagency/intranet
 /**
  * {@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);
     }
 }
コード例 #3
0
 /**
  * {@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);
     }
 }
コード例 #4
0
 /**
  * {@inheritdoc}
  */
 public function preprocessSearchQuery(QueryInterface $query)
 {
     return $this->entity->preprocessSearchQuery($query);
 }