protected function SearchApiSolrBackend::addLanguageConditions in Search API Solr 8
Same name and namespace in other branches
- 8.2 src/Plugin/search_api/backend/SearchApiSolrBackend.php \Drupal\search_api_solr\Plugin\search_api\backend\SearchApiSolrBackend::addLanguageConditions()
Adds item language conditions to the condition group, if applicable.
Parameters
\Drupal\search_api\Query\ConditionGroupInterface $condition_group: The condition group on which to set conditions.
\Drupal\search_api\Query\QueryInterface $query: The query to inspect for language settings.
See also
\Drupal\search_api\Query\QueryInterface::getLanguages()
1 call to SearchApiSolrBackend::addLanguageConditions()
- SearchApiSolrBackend::getFilterQueries in src/
Plugin/ search_api/ backend/ SearchApiSolrBackend.php - Serializes a query's conditions as Solr filter queries.
File
- src/
Plugin/ search_api/ backend/ SearchApiSolrBackend.php, line 1646
Class
- SearchApiSolrBackend
- Apache Solr backend for search api.
Namespace
Drupal\search_api_solr\Plugin\search_api\backendCode
protected function addLanguageConditions(ConditionGroupInterface $condition_group, QueryInterface $query) {
$languages = $query
->getLanguages();
if ($languages !== NULL) {
$condition_group
->addCondition('search_api_language', $languages, 'IN');
}
}