You are here

public function FacetapiQuery::addFacetJoin in Faceted Navigation for Search 7

Adds the facet join, but only does so once.

Parameters

array $query_info: An associative array of query information.

$table_alias: The alias of the table being joined.

@return FacetapiQuery An instance of this class.

File

./search_facetapi.extender.inc, line 29
Facet query builder, strips all scoring from the SearchQuery class.

Class

FacetapiQuery
Extension of the SearchQuery class.

Code

public function addFacetJoin(array $query_info, $table_alias) {
  if (isset($query_info['joins'][$table_alias])) {
    if (!isset($this->joinedTables[$table_alias])) {
      $this->joinedTables[$table_alias] = TRUE;
      $join_info = $query_info['joins'][$table_alias];
      $this
        ->join($join_info['table'], $join_info['alias'], $join_info['condition']);
    }
  }
}