class RequestBuilder in Search API Solr 4.x
Same name and namespace in other branches
- 8.3 src/Solarium/Autocomplete/RequestBuilder.php \Drupal\search_api_solr\Solarium\Autocomplete\RequestBuilder
- 8 src/Solarium/Autocomplete/RequestBuilder.php \Drupal\search_api_solr\Solarium\Autocomplete\RequestBuilder
- 8.2 src/Solarium/Autocomplete/RequestBuilder.php \Drupal\search_api_solr\Solarium\Autocomplete\RequestBuilder
Autocomplete request builder.
Hierarchy
- class \Drupal\search_api_solr\Solarium\Autocomplete\RequestBuilder extends \Solarium\Core\Query\AbstractRequestBuilder
Expanded class hierarchy of RequestBuilder
File
- src/
Solarium/ Autocomplete/ RequestBuilder.php, line 12
Namespace
Drupal\search_api_solr\Solarium\AutocompleteView source
class RequestBuilder extends AbstractRequestBuilder {
/**
* Build request for an autocomplete query.
*
* @param \Solarium\Core\Query\AbstractQuery $query
* The Solarium query.
*
* @return \Solarium\Core\Client\Request
* The Solarium request.
*/
public function build(AbstractQuery $query) : Request {
/** @var \Drupal\search_api_solr\Solarium\Autocomplete\Query $query */
$request = parent::build($query);
foreach ($query
->getComponents() as $component) {
$componentBuilder = $component
->getRequestBuilder();
if ($componentBuilder) {
$request = $componentBuilder
->buildComponent($component, $request);
}
}
return $request;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
RequestBuilder:: |
public | function | Build request for an autocomplete query. |