public function SolrBaseQuery::addContext in Apache Solr Search 7
Same name and namespace in other branches
- 8 Solr_Base_Query.php \SolrBaseQuery::addContext()
- 6.3 Solr_Base_Query.php \SolrBaseQuery::addContext()
Set context value.
Overrides DrupalSolrQueryInterface::addContext
1 call to SolrBaseQuery::addContext()
File
- ./
Solr_Base_Query.php, line 356 - This class allows you to make operations on a query that will be sent to Apache Solr. methods such as adding and removing sorts, remove and replace parameters, adding and removing filters, getters and setters for various parameters and more
Class
Code
public function addContext(array $context) {
foreach ($context as $k => $v) {
$this->context[$k] = $v;
}
// The env_id must match that of the actual $solr object
$this->context['env_id'] = $this->solr
->getId();
return $this->context;
}